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

Improve null display value in AbstractSingleSelectChoice

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.5.0
    • 6.6.0
    • wicket
    • None

    Description

      AbstractSingleSelectChoice makes it hard to customize the display values for null because it's hard coded to look it up by property keys. This is done in getDefaultChoice and it's not possible to change the behavior without overriding the whole method.

      I extracted getNullValidDisplayValue and getNullKeyDisplayValue which are then called in getDefaultChoice and default to the current behavior. Now subclasses can change these values easily.

      Attachments

        1. WICKET-5006.patch
          3 kB
          Christoph Leiter

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            cleiter Christoph Leiter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: