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

Improve null display value in AbstractSingleSelectChoice

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.5.0
    • Fix Version/s: 6.6.0
    • Component/s: wicket
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: