cancel
Showing results for 
Search instead for 
Did you mean: 

Context and Binding: Value Attributes inside Value Nodes

Former Member
0 Kudos

Hi all!

When we include a new Value Attributes inside Value Nodes, configure their bindings and set the value attribute to 'value' property of a InputText this Input appear disabled in runtime...

If the same Value Attributes is created in the root of Context, this works fine...

Someone knows what happens...???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If an InputField has no context element to store its value in, it gets disabled by the framework.

A node declared at designtime must be filled with elements ar runtime. If you are sure that the node always contains at least one element, you can set the cardinality to 1:*, then the framework will always create an element for you.

Armin

Former Member
0 Kudos

Thank's for you all folks...

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Flavio,

If the attribute is included inside a value node then you need to create an instance of the node and bind it to the same. A pointer code will look something like this.


IPrivate<yourViewName>.I<yourNodeElementName> element = 
           wdContext.create<yourNode>();
element.set<yourAttribute>(");
wdContext.node<yourNode>.bind(element);

Bala

pravesh_verma
Active Contributor
0 Kudos

Hi Flavio,

I think you must write this code in your <b>wdDoInit()</b> function:

public void wdDoInit()
  {
    //@@begin wdDoInit()
		wdContext.node<Your_Node_Name>().createAndAddElement();
    //@@end
  }

This should solve your Problem!!..

Regards

Pravesh

PS: Please consider rewarding points if helpful and Solved.