cancel
Showing results for 
Search instead for 
Did you mean: 

Mobile Hanheld UI : How to create and use DropDown by Key

muhammed_nishad
Participant
0 Kudos

Hi All,

I am using Netweaver Mobile 7.1 CE. In My UI screen I need to use a dropdown by Key. The values from the model are placed in the Componet controller context and mapped to the View Context.Say the context is having 100 records,depending upon the values selected from the dropdown i need to filter the vlaues from the context and need to show in a table.

How to use the dropdown by key in mobile UI(I am using mobile perspective for handheld)Composite development .

Regards,

Muhammed Nishad J

Accepted Solutions (0)

Answers (3)

Answers (3)

muhammed_nishad
Participant
0 Kudos

This issue solved .

Former Member
0 Kudos

Hi Nishad,

The following dev doc explains how to use Value Help in DropDownbyKey Dropdown control.

http://help.sap.com/saphelp_nwmobile71/helpdata/EN/46/3591388578141de10000000a1553f6/content.htm

I hope this helps.

Best Regards,

Amit

Former Member
0 Kudos

Hi

For populating static values, create a simple type and bind to the dropdownbykey UI element.

For dynamic values

DropDownByKeyViewItem dropDownByKey = view.getRootUIElementContainerViewItem().createDropDownByKey("Some name");

dropDownByKey.setWidth(300);

dropDownByKey.setVisible(true);

dropDownByKey.bindEnableProperty(wdContext.nodeSomeNode(), "some-attr");

Please refer to the javadocs in this link:

http://help.sap.com/javadocs/nwmobile/SP3/handhelds/index.html

Regards

Vidyadhar

0 Kudos

Hi,

I´m new to mobile and I´m trying to populate a drop down by key too.

I´ve done everything you proposed in your post, but could´t make it work, it´s shown empty in screen and desabled ...even using bindEnablePrperty method.

I have a context node with some values I get from an XML file, and the context node gets populated ok.

In your post you suggest using the following in order to create / initialized the drop down by key UI element:

DropDownByKeyViewItem dropDownByKey = view.getRootUIElementContainerViewItem().createDropDownByKey("Some name");

I´ve look the API reference you refered to (http://help.sap.com/javadocs/nwmobile/SP3/handhelds/index.html) but I can´t find the method getRootUIElementContainerViewItem() of the view object... where is it?

I can´t make it work. Have you ever use this UI element? Is there any other way to achieve the same?

Thanks in advance.

Regards,

Lau

0 Kudos

Hi,

I worked it out using drop down by index UI element. I could´t make DDBKey work consuming dynamic values from a context node.

With DDBIndex the binding is transparent, and no lines of code are needed as for DDBKey UI element.

Regards,

Lau