on 04-07-2010 2:13 PM
Hi,
I have created 3 input fields dynamically, now on calling of a method, i want to display values in those dynamically created input fields.
Can any one please guide me on this.
Regards,
Lakshmi.
The InputField UI element has a property named "value" that must be bound to some context attribute (it does not matter whether this attribute is created using the IDE or by code).
Example: To create an input field and bind it to an attribute "abc" created in the IDE, use code like
IWDInputField fld = (IWDInputField) view.createElement(IWDInputField.class, "InputFieldForABC";
IWDAttributeInfo attribute = wdContext.getNodeInfo().getAttribute("abc");
fld.bindValue(attribute);
To set the value of the input field just set the attribute value:
wdContext.currentContextElement().setAbc("some string");
Of course if the attribute "abc" is not located inside the context root, the code has to be adapted accordingly.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
That s correct as said by Galinski. Just keep in mind that you do create the context before usign that or else results in exception.
Best Regards
Chander Kararia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The values displayed in the fields are the values that are strored in the context.
So you can just use the normal wdContext.currentXXX.setYYY(....) API.
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 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.