Skip to Content
author's profile photo Former Member
Former Member

dynamically inserting values into DropDownKey

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2005 at 08:16 AM

    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/IWDAttributeInfo.html#getModifiableSimpleType()

    Search this forum for "modifiable".

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 24, 2005 at 08:52 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.