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

improve StringResourceModel's resource key interpolation for null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 7.0.0-M5
    • None
    • 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. fix-WICKET-5820_other_approach.patch
          0.8 kB
          Kamil
        2. fix-WICKET-5820.patch
          0.7 kB
          Kamil
        3. TestCase_WICKET_5820.java
          1 kB
          Kamil

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: