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

StringResourceModel should provide an overridable getString(Component) method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.7
    • 7.0.0-M5, 6.19.0
    • wicket
    • None

    Description

      String ResourceModel is not really subclassable to provide additional logic (for example return an empty string if not all properties could be evaluated etc).
      Normally, any LDM can be subclassed an it's load() method overridden which does not work here in most cases since the model is wrapped internally and if the SRM was not constructed with an explicit component (but attached later to a component), the load() method of the STM is never evaluated since the AssignmentWrapper calls getString(Component) directly.
      This method should be overridable in some way and the javadoc on load() amended to inform programmers that overriding this method will not always lead to the desired goal.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            tapter Matthias Keller
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: