Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3278

DropDownChoice no selection value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-M3
    • 1.5-RC1
    • wicket
    • None
    • Any

    Description

      This problem came from this topic:
      http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-no-selection-value-td3160661.html

      I've noticed that the method AbstractSingleSelectChoice.getNoSelectionValue() returns the value for no selection. In AbstractSingleSelectChoice.getDefaultChoice(final Object selected) on line 314:
      return "\n<option selected=\"selected\" value=\"\">" + option + "</option>";

      and on line 296:
      buffer.append(" value=\"\">").append(option).append("</option>");

      In those cases the null value option has empty value attribute. Wouldn't it be more consistent for this option to have the "value" attribute with the result provided from getNoSelectionValue()?

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            hok Ivan Vasilev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: