cancel
Showing results for 
Search instead for 
Did you mean: 

Web dynpro Java + interctaive forms + dorp down list

Former Member
0 Kudos

Hi,

I'm currently trying to display manager names in a drop down list in an interactive forms.

The node binded to the drop down list is filled in by the Java web dynpro application and it's correctly filled, I have check.

My problem is that only the first value is dispalyed in the drop down list. I can't selected other values.

My question is: - which drop down should I uses?

- How do I have to do the binding?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Ruturaj,

Thanks for your answer, but in my case, I need to create my list dynamicaly in my web dynpro java application. I have a FM that returns my a list of managers name.

I need to bind that list to the drop down list in the form.

How to do it?

Please I need a step by step documentation.

Thanks a lot

Karim

Former Member
0 Kudos

Hi,

Can anybody tel me a step by step procedure to create a drop down list.

Qualiture
Active Contributor
0 Kudos

Prerequisites:

Add your key-value pairs of the returned managers in a java Map object first, in my example below its the object 'map'

Get the attributeInfo of the field from your node's nodeinfo, in my example its the object 'attrInfo'

F.i. wdContext.node<YourNode>().getNodeInfo().getAttribute(IPrivate<YourView>.I<ViewElement>Element.<YOURATTRIBUTE>

Then it's fairly straightforward:

IModifiableSimpleValueSet svSet = attrInfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
svSet.clear();
	  	
for (Iterator i = map.entrySet().iterator(); i.hasNext();) {
	Map.Entry entry = (Map.Entry) i.next();
	svSet.put(entry.getKey(), (String)entry.getValue());
}

Then, in your view, bind the dropdown control to the context value attribute, and it should work

Best regards,

Robin van het Hof

Former Member
0 Kudos

Hi Karim Ja,

You have two kinds of UI Elements for the Use of Drop Down List.

Drop Down By Key

Drop down by key is normally used when the drop down data comes from a local dictionary that you defined in the application.

Drop Down By Index

Drop down by index in case the data is populated from a BAPI call.

Here you have to use the Drop Down By Key for it you have a property called Selected key give the attribute in which you are storing your values.

Thanks & Regards,

Sharma Kvbk.