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

Improve null display value in AbstractSingleSelectChoice

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment