Skip to Content
avatar image
Former Member

default value of DropDownByIndex

hello,

i am searching for the possibility to access the default value of a dropdown element in java WebDynpro. I exactly mean the "blank" value in the top of a drop down box.

In my scenario i want to display different data in a table related to the selected values in the drop down box. If the user choose the "blank" data should be diplayed as well.

does anyone have a idea??

thanks in advance,

regards,

rene

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 19, 2006 at 06:24 PM

    This line set to the default FIRST LINE BLANK

    wdContext.nodeYOUR_NODE().setLeadSelection(-1);

    This control say you if BLANK line is selected

    if (wdContext.nodeYOUR_NODE().getLeadSelection(-1) == -1){

    //BLANK CASE

    }

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello,

      i solved it. The problem with the null pointer exception was not caused by the coding Arming suggested. Arming your solution helped me. Thanks!

      best regards,

      Rene

  • avatar image
    Former Member
    Oct 19, 2006 at 05:26 PM

    A DropDownByIndex displays an empty value if the node to which it is bound has no lead selection.

    Example:

    dropdown.texts -> SomeNode.SomeAttribute
    
    if (wdContext.nodeSomeNode().getLeadSelection() == IWDNode.NO_SELECTION)
    {
      /* drop-down displays empty value */
    }

    Armin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 19, 2006 at 03:38 PM

    hi

    If I get your problem correctly you are trying to display data in the table that has beeb selected from the dropdown.if this is the case then what do you expect to be displayed when a blank is seleced.

    thanks

    Lohi.

    Add comment
    10|10000 characters needed characters exceeded