Skip to Content
avatar image
Former Member

Checkbox ebedded in a dropdown !?

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 14, 2006 at 06:23 PM

    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

    Add comment
    10|10000 characters needed characters exceeded