cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a dropdown in Web Dynpro

Former Member
0 Kudos

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???

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

You can create Dropdown in two ways,

1. Create a simpleType.(DictionariesLocal dictonarysimpleTypes)

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);

}