cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down List By Key - Including a blank selection

Former Member
0 Kudos

Hi all,

In R/3 ABAP, when we reference a data element(with domain) from the data dictionary into a textfield(as dropdown) in a screen, we will be able access the domain values via the F4. The dropdown in ABAP will always include a blank field for selection.

But in Java webdynpro, I successful bind a model attribute from the model into the dropdown list but when I click on the dropdown list, it contains the domain value but there's no blank field for selection. The page did initial display blank but after selecting other values, I cannot select back the blank field.

I'm using the DropDownByKey with selectedKey binded to a value attribute that "type = com.sap..." model attribute. (imported field with domain and fixed emuneration)

How can I configure/code the dropdown list to include that blank field for selection?

Your help or advise is much appreciated. Thanks

Best Regards,

Jansen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Jansen,

I suggest you to use DropdownbyIndex UI element and set the <b>initializeLeadSelection</b> to <i>false</i> and <b>selection cardinality</b> to <i>0:1</i> of the corresponding context node. As a result, it will display a blank line.

If you want to use Dropdownbykey then add one element with blank value.

Bala

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jansen,

Before populating the values through iteration in the valueSet do the follwing

ValueSet.put("Default","Select a value");

In the view controller set this key as default.

wdContext.currentNodeElement().set<arrtibute bind to DropDownByKey.selectedKey property>("Default");

Former Member
0 Kudos

Hi Jansen

I'm also struggling with the same problem.

If you have solved your problem, please share the solution.

Regards

Vineet Vikram