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

improve StringResourceModel's resource key interpolation for null

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0-M5
    • Component/s: None
    • Labels:
      None

      Description

      When using StringResourceModel one can add property expression into the resourceKey.
      As documentation states: expression will be evaluated if the model parameter is not null.
      But when parameter is null, with given example:

      new StringResourceModel("my.resource.${my.propertyValue}"), myModel);
      

      one can expect the need to provide

      my.resource.null
      

      resource key (same case as with DropDownChoice).
      In fact, Wicket is searching for

      my.resource.${my.propertyValue}
      

      (literarily) instead which is just wrong.

        Attachments

        1. TestCase_WICKET_5820.java
          1 kB
          Kamil
        2. fix-WICKET-5820.patch
          0.7 kB
          Kamil
        3. fix-WICKET-5820_other_approach.patch
          0.8 kB
          Kamil

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              eximius313 Kamil
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: