cancel
Showing results for 
Search instead for 
Did you mean: 

Checkbox ebedded in a dropdown !?

Former Member
0 Kudos

Hi Web Dynpro developers,

I need something like a dropdown, having string values, but the user should be able to select or unselect these string values (like the checkbox does). The standard Web Dynpro library doesn't have such thing.

Do you know of anything like that or of a possible solution?

Thank you very much

Cristian

Accepted Solutions (1)

Accepted Solutions (1)

suresh_krishnamoorthy
Active Contributor
0 Kudos

You can try like this..

Create Layout like this..

label dropdown button(add) button(Remove)

Textedit.

select value on dropdown and click on add button

display selected value on textedit. when you select second value display with comma seperated string...

ADD Action code´

String selectedDropDown = null;

String selectedValue = null;

String[] tempArray = null;

boolean existFlag = false;

selectedValue = wdContext.currentContextElement().getSelectedValue();

if (selectedValue != null && !selectedValue.equalsIgnoreCase(""))

{

tempArray = selectedValue.split(",");

}

selectedDropDown = wdContext.currentContextElement().getDDKey();

if(selectedDropDown!=null && tempArray!=null)

{

for(int i = 0; i;

else

newSelectedValue= ","tempArray;

existFlag = true;

}

}

if(existFlag == true)

wdContext.currentContextElement().setSelectedValue(newSelectedValue);

else

wdContext.currentContextElement().setSelectedValue(selectedValue);

Regards, Suresh KB

Former Member
0 Kudos

Thank you, Suresh, for your solution

And for the complete code

Answers (0)