cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing value node and value attributes from View's code

Former Member
0 Kudos

Hi folks,

I came here with the very simple question but for now it is mystery for me. If I declare in View Context an value node (e.g. Employee) and inside that node some value attributes (e.g. FName, SName) how can I instantiate that node and how can I access those attributes from the code of the view (I mean the view which context contains employee node). Thanks in advance for you effort end time.

Kind Regards,

Aleksandar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Aleksandar,

Suppose your Value node name is Name and Value attribute name is FirstName and LastName.

Name

-


FirstName

-


LastName.

Now to acces this node... first create and element of the value node in the WdInit of your View like the following.

wdContext.nodeName.addElement(wdContext.nodeName.createElement);

Now if you want to access the Vlue attribute called FirstName then you can do it in the following way...

To get the value of the value attribute.

wdContext.currentNameElement.getFirstName()

or if you want to set the value of the value attribute then

wdContext.currentNameElement.setFirstName("Mr. X");

If you need more hep let me know... Please reawrd points if helps.

Thanks and Regards

Avijit Dhar

Answers (0)