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

How to create a dropdown in Web Dynpro

Hi,

I just wanted to know how to create a dropdown box.

Actually I am using a webservice and on the view I have to create a dropdown box with 4 values inside it.Also I have to map dat same field with one of the fields in the webservices request node.Is this possible???

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 04:10 AM

    Hi,

    You can create Dropdown in two ways,

    1. Create a simpleType.(Dictionaries Local dictonary simpleTypes)

    2. Go to enumeration , and add the data.

    3. Create a context and in the property of the context , choose select and select the local dictionary and select the one which you have created.

    4. You can create a DropDownKey and map to the context.

    Dropdown by Index.

    1.) Take DropDownByIndex UI Element in the Layout Tab.

    2.) Take One ValueNode Named "Employee" in the Context.

    3.) Take One Value Attribute Named "Id" for the Node "Employee".

    4.) Bind "Employee.Id" to the texts Property of the DropDownByIndex.

    5.) Set the "Employee" Node Properties in the Context Tab as

    a.) Cardinality --> 0..n

    b.) Selection --> 1..1

    c.) Singleton --> True

    6.) Write the Below Code in the Implementation Tab.

    IPrivate<View Name>.IEmployeeElement empEle;

    for(int i=0;i<3;i++)

    {

    empEle = wdContext.createEmployeeElement();

    empEle.setId("Emp Id "+i);

    wdContext.nodeEmployee().addElement(empEle);

    }

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 04:23 AM
    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.