cancel
Showing results for 
Search instead for 
Did you mean: 

Node attributes - inputField value

Former Member
0 Kudos

A couple of days ago I tried to connect the attribute "Projects.NAME" to a inputfield. But, when I executed the application, the input stay grey. (seems disabled)

When I tried to connect a field to a context attribute ("NAME"), the form is OK.

Did someone know why, and, how to fix this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Adri,

When create a context attribute say 'NAME' the access to it is available by default. But when you need to access the attribute that is bound inside a Node, it depends on the cardinality property. Only when an open element is available you can access the node attribute. If you want to access the node attribute then set the cardinality property of the node holding the attribute as 1...1 or 1...n (OR) create an element and then try accessing it (when cardinaility is set to 0...1 or 0...n), i.e.,

<b>IPrivate<View Name>.I<Node Name>Element<Element Name>=wdContext.node<Node Name>().create<Node Name>Element();

Now you can access the element using the code as follows:

<Element Name>.set<Attribute Name>(<Value>);

Data Type <Variable> = <Element Name>.get<Attribute Name>(<Value>);</b>

Regards,

Mathan MP

Answers (1)

Answers (1)

Former Member
0 Kudos

Adri,

Node Projects has no elements or has no lead selected element.

-- Make sure node Projects has elements, either add them in wdDoInit or define a supplyFunction for node that adds at least one element.

-- Set selection cardinality of node to 1..1 or set initializeLeadSelection to true.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net