cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically inserting values into DropDownKey

Former Member
0 Kudos

hi

i want to insert the values in a DropDownKey dynamically

i.e., without using Dictionary Enumeration.

for this i created dropdown ui element and binded it to the context attribute 'key'.

please help me

any snippet of code is valuable

thanks and regards

Narayan Adhurthi.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi narayan,

try this piece of code

IWDAttributeInfo attinfo = wdContext.getNodeInfo().getAttribute("key");

ISimpleTypeModifiable modinfo = attinfo.getModifiableSimpleType(); IModifiableSimpleValueSet valset = modinfo.getSVServices().getModifiableSimpleValueSet();

valset.put(new String("key"),value);

if you want to add more elements again use valset.put

regards,

rahul.

Former Member
0 Kudos

You can modify the value set of a context attribute at runtime, see

https://media.sdn.sap.com/javadocs/NW04/SP12/webdynpro/com/sap/tc/webdynpro/progmodel/api/IWDAttribu...

Search this forum for "modifiable".

Armin