on 07-20-2009 4:00 PM
Hi,
I have a requirement to do the following:
A context exists which is defined to contain multiple items (ItemsName). The UI has an Add button to allow a user to add an item using an InputField. Everytime the user clicks on Add, a new Input Field get generated. In other words, I will need InputField_ItemName1 binded to the first item, InputField_ItemName2 binded to the second item and so on. The screen will have multiple Input Fields that represents that number of Items the user wants to add.
How do I go about doing this? After creating the element and the Input Fields in my current program, all the Input Fields get updated to whatever the last value I entered on any on the Input Fields generated. If I change the third Input Field, refreshing the screen updates all existing Input Fields to the value I entered.
Please help.
Thanks,
Mark
What you want to do is not possible, namely binding input fields against individual node elements. You either have to use a context-driven UI element like Table or RowRepeater or you have to create individual context attributes and bind the input fields against these.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Please have a look at below links,
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/7765. [original link is broken] [original link is broken] [original link is broken]
Regards,
Krishna chaitanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer these threads,
https://wiki.sdn.sap.com/wiki/display/WDJava/WebDynproJava
http://help.sap.com/saphelp_nw04/helpdata/en/4f/07cf3dd28b5610e10000000a114084/frameset.htm
https://wiki.sdn.sap.com/wiki/display/WDJava/DynamicUIGeneration
Regards,
Sunaina Reddy t
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark
Each new InputField you are creating dynamically should be bound to a separate context attribute. So basically and very often when new UI control like InputField is dynamically created a developer has to create also a new context attribute which will keep the value of the field.
You can create a new attribute with method:
IWDAttributeInfo attrInfo = IWDNodeInfo.addAttribute(attrName, IDataType);
Then you have to bind a new input field to the attribute:
IWDInputField.bindValue(attrInfo);
Finally you can read the value typed by user:
IWDNodeElement.getAttributeValue(attrName);
Alternatively you may think also about Table control instead of the separate input fields. The Add button will just insert a new row in the table. It'll be much easier.
BR, Sergei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
Have you read the documentation provided by SAP : [Dynamic UI Generation in Web Dynpro|http://help.sap.com/saphelp_nw70/helpdata/en/04/72a840bd6d3c13e10000000a155106/frameset.htm]? This documentation is quite good and there are some examples.
Regards,
Pierre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.