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

Localization messages stops working with validators since 1.4-rc2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4-RC2, 1.4-RC4, 1.4-RC5
    • 1.4.0
    • wicket
    • None

    Description

      With the previous 1.3.6 and 1.4-rc1 releases I was capable to restrict a localization message for a validation to only one wicket id e.g. :

      in foobar.java
      RequiredTextField nameTF = new RequiredTextField("name");
      nameTF.add(StringValidator.lengthBetween(2, 255));
      nameTF.add(new PatternValidator("[^|:]*"));

      and in foobar.properties
      name.Required=some text
      name.StringValidator.range=some other text
      name.PatternValidator=some other text again

      So, like this I could have to create an another RequiredTextField named "password", and attach to it a different localization message (for example "password.Required=blabla").

      But somehow with the 1.4-rc2-5 it looks like that this function is broken, it only recognizes the localization text, when I remove the "name." prefix from my property.

      Attachments

        1. validation-quickstart.zip
          9 kB
          Peter Major

        Activity

          People

            ivaynberg Igor Vaynberg
            aldaris Peter Major
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified