Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Generating Dynamic form from static context.

Hi All

I have static context node structure

Section (Node)

QuestionText (Attribute)

AnsText (Attribute)

I have populated the values in this node from an RFC in my code .

Now i need to create a form dynamically with QuestionText as labels and AnsText as input fields.

I have written the following code

for(int i = 0; i< wdContext.nodeSection().getSize; i++)

{

IWDInputField inp_Ans = (IWDInputField)view.createElement(IWDInputField.class,"ID"+i);

IWDAttributeInfo ansAtrib = wdContext.nodeSection().getNodeInfo().getAttribute("AnsText");

inp_Ans.bindValue(ansAtrib);

}

This way i have bound a single attribute to all inputfields.

So the value in the first element of AnsText appears in all inputfields.

In case of tables it works fine but i need to create the form.

Kindly help me in solving the issue.

Regards

Sonal

Former Member
Not what you were looking for? View more on this topic or Ask a question