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

ListMultipleChoice should allow its model to return a different collection on each access

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.17
    • 1.5-RC6
    • wicket

    Description

      With revision 646020 an unnecessary restriction was introduced to ListMultipleChoice, as the model is no longer allowed to return different collections on each invocation of #getObject().

      Note that this change is in conflict with the javadoc of #updateModel() which explicitely allows such usage:
      /**

      • If the model object exists, it is assumed to be a Collection, and it is modified in-place.
      • Then {@link Model#setObject(Object)}

        is called with the same instance: it allows the Model to

      • be notified of changes even when {@link Model#getObject()}

        returns a different

      • {@link Collection}

        at every invocation.
        */

      Please remove the check for identity of the model object, see attached patch.

      Thanks

      Attachments

        Activity

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

          People

            svenmeier Sven Meier
            svenmeier Sven Meier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment