Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-13063

Selections: Allow null value in StaticDropDown

    XMLWordPrintable

Details

    Description

      A static drop down starts with a value of null and displays "Choose one". After a value is selected it is no longer possible to select a null value. You can add an empty value but this means the initial drop down will have an extra option "Choose one" which will not be visible if something is selected. This is true even if an initial value is provided in the document type.

      The StaticDropdownPlugin uses uses a "org.apache.wicket.markup.html.form.DropDownChoice" which is a subclass of "org.apache.wicket.markup.html.form.AbstractSingleSelectChoice" where a method "#setNullValid(boolean)" is defined. When this method is set to true, the "Choose One" option is also shown when the field contains a non null value and is being edited.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jfloor Jasper Floor
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: