cancel
Showing results for 
Search instead for 
Did you mean: 

creating drop down list in web dynpro in java application

Former Member
0 Kudos

Hello All ,

Please help me out in creating drop down list in web dynpro in java application .

If Possible please send the sample code as well.

Thanks

Jyothi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Look for below space...and also try google the basic questions before asking them here......

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a...

http://wiki.sdn.sap.com/wiki/display/HOME/ValueHelpsinWebDynproJava-BestPractices

Former Member
0 Kudos

Hello,

I tried in this way but my issue is not solved.

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.

but it is not enabled. In properties ennabled-true, readonly -false but it is not enabled.

junwu
Active Contributor
0 Kudos

it's better you ask in this way. then we can guide you better.

where you create your attribute?

if it is not created directly under root context, you have to set the node cardinality to 1:1, or using code to create an element of that type.

the point here is the context you defined is just to provide type information, you have to new a object of that type to get memory allocated, which will in turn enable the UI control.

Edited by: John Wu on Oct 3, 2011 9:10 AM

Former Member
0 Kudos

Ok. Defnetly i will improve in asking question directly.

I created an attribute under root node which cardinality is 0..n and selection is 0..1.

junwu
Active Contributor
0 Kudos

attribute has no cardinality, only node has.

you can create a attribute under the root context with the type you defined before and assign it to the UI control

Former Member
0 Kudos

yes sir,

What i specified before is for node only. i bound it ui element also but am not getting. The same way i tried for radio button i got it. But for Dropdown its troubling.

Former Member
0 Kudos

Hi Venkat,

The cardinality of the context node should be 1:1 (as John mentioned) and not 0:n. Now create a context attribute under this node which has the same type as the dictionary simple type created by you and then map this attribute to "selectedKey" property of DropDownByKey UI element.

Regards,

Pavithra

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jyothi,

You can try the following code to create a List using DropDownbyIndex..


IPrivate<view>.I<Contextnode>Element ele = null;
for(int i=0;i<<Contextnode>.size();i++)
{
ele = wdContext.create<Contextnode>Element();
ele.set<attribute>(<list value>);
wdContext.node<Contextnode>.addElement(ele);
}

Regards,

Vijay.

Former Member
0 Kudos

Thankyou.

junwu
Active Contributor
0 Kudos