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

Drop down UI Element

Hi,

I need to have a drop down UI element in my view and this drop down should contain the values from a bapi.

Which is the type of drop down i should use? Is it dropdownbykey or dropdownbyindex?

And also how to fetch the values in the dropdown ui element dynamically?

Regards,

Padmalatha.K

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 05:49 AM

    Hi Padma,

    Go for drop down by index in this case.

    Here, <outputnode> is the node of your RFC that holds the result and <nodename> is the node binded to your ddi.

    for(int i=0; i<wdContxt.node><outputnode>().size();i++)

    {

    IPrivate<viewname>.I<nodename>Element ele = wdContext.node<nodename>().createElement();

    ele.set<attribute>(wdContext.node<outputnode>().getElementAt(i).get<attribute>();

    wdContext.node<nodename>().addElement(ele);

    }

    for ddk:

    IWDAttributeInfo attr = wdContext.getNodeInfo().getAttribute(<attributename>);

    ISimpleTypeModifiable sim = attr.getModifiableSimpleType();

    IModifiableSimpleValueSet vs = sim.getSVServices().getModifiableSimpleValueSet();

    for(int i=0; i<wdContxt.node><outputnode>().size();i++)

    {

    String temp = wdContext.node<outputnode>().getElementAt(i).get<attribute>();

    vs.put(temp,temp);

    wdContext.currentContextElement().set<attribute>(<value>); // to get initial selection.

    }

    Regards,

    Murtuza

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 06:02 AM

    Hi,

    Your requirement is to put values into DropDown Dynamically..

    So, use DropDownByIndex UI Element

    ArrayList al=new ArrayList();

    loop upto the size of data coming from BackEnd

    IPrivate<ViewName>View.I<DDNode>Element ele=wdContext.create<DDNode>Element();

    ele.set<value>(<Value from Vackend>);

    al.add(ele);

    end loop

    wdContext.node<DDNode>().bind(al);

    Regards

    LakshmiNarayana

    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.