on 01-24-2008 6:31 PM
Hello experts,
I'm developing a webdynpro application that needs to dynamically populate a drop down by key UI Element based on an ArrayList... Can anyone help me, I'm kinda stuck here.. thanks in advance.
JV
If you use DDByKey, you have to populate the value set of the DDIC type of the context attribute to which the "selectedKey" property is bound. Search the forum for "ModifiableSimpleType".
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jesus.
What Armin meant was this:
//Use of ISimpleTypeModifiable to populate dropdowns by key
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.ATTRIBNAME);
ISimpleTypeModifiable attribNameType = attributeInfo.getModifiableSimpleType();
IModifiableSimpleValueSet valueSet = attribNameType.getSVServices().getModifiableSimpleValueSet();
//Clear previous data
valueSet.clear();
//on this part just extract those values from arraylist and craft your Key-Text pairs
//mm dunno, you can iterate
for (int i = 0; i <= 400; i++)
{
valueSet.put("Key_"+i,"Text "+i);
}
//Anoter method to achieve the same, more direct xD
IModifiableSimpleValueSet ValueSet = wdContext.getNodeInfo().getChild("<your table nodename>").
getAttribute("drop_attrib_name").getModifiableSimpleType().getSVServices().
getModifiableSimpleValueSet();
//Same here, you could iterate extracting those Key-Text pairs and put into ValueSet
ValueSet.put("Key","Text");
//etc
Regards
Julio Herrera
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.