on 05-19-2010 4:23 PM
Hi,
How to set values in DropDownByKey dynamicaly using web dynpro java
Thanks.
Edited by: venkat99 on May 19, 2010 5:26 PM
Hi Venkat,
Create a context node and one attribute inside the node for drop down. Then bind this context with DropDownBY Key.
Now populate the attribute in your code :
//Read attirbute info:-
IWDAttributeInfo att=wdContext.getNodeInfo().getAttribute(IPrivate<ViewName>View.IContextElement.DDValue);
//Define type
ISimpleTypeModifiable ss=att.getModifiableSimpleType();
//define value set
IModifiableSimpleValueSet ValueSet=ss.getSVServices().getModifiableSimpleValueSet();
Or use single line code for above three line
final IModifiableSimpleValueSet ValueSet= wdContext.getNodeInfo().getChild("<your table node>").getAttribute("drop_attrib").getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
// populate the valueset with some values , eg:
ValueSet.put("A","A");
ValueSet.put("B","B");
ValueSet.put("C","C");
ValueSet.put("D","D");
Or if values are stored in an array or list then
for(int i=0;i<array size();i++)
{
ValueSet.put(key, value)
}
Hope this may help you.
Deepak!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
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.