on 11-12-2010 1:45 PM
Hello,
I am creating context node elements at runtime. My node looks like this -
LocalNode
Question
Answer
for(int i;i<wdContext.nodeLocalNode.size();i++)
{
wdContext.nodeLocalNode().setLeadSelection(i);
IWDTextView TV1 = (IWDTextView)view.createElement(IWDTextView.class,"TV"+i);
TV1.setText(wdContext.currentLocalNodeElement().getQuestion());
mainGrp.addChild(TV1);
IWDInputField IP1 = (IWDInputField)view.createElement(IWDInputField.class,"TE"+i);
IP1.bindValue("LocalNode.Answer");
IP1.setValue(wdContext..currentLocalNodeElement().getAnswer());
mainGrp.addChild(IP1);
}
Please note: Question column is the textView and Answer column is the input field
The output should be as follows-
Question Answer
Header None
How Many 7
Comments Maybe valid
Do you agree Yes
Although the text view displays correctly, the input field only shows the last record value and the output currently displays as follows-
Question Answer
Header Yes
How Many Yes
Comments Yes
Do you agree Yes
What am I doing wrong here?
How can I bind the corresponding values to the input field in a loop?
Regards,
Nisha
Solved by creating a new dynamic node for every iteration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.