Commons Validator
  1. Commons Validator
  2. VALIDATOR-68

ValidatorResources.get-method not working properly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: 1.1.0 (alpha)
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: PC

      Description

      The get-method in the ValidatorResources is not working properly as it returns
      always null if the exact combination of language, country and variant is not
      found in the formset-declaration of the validation.xml. I expected it to work
      like the struts PropertyMessageResource class trying to retrieve first the most
      specific formset and at last retrieving the most general formset.

        Activity

        Hide
        Björn-H. Moritz added a comment -

        Created an attachment (id=3774)
        Patch of the get-method

        Show
        Björn-H. Moritz added a comment - Created an attachment (id=3774) Patch of the get-method
        Hide
        Björn-H. Moritz added a comment -

        Created an attachment (id=3775)
        Patch of the get-method

        Show
        Björn-H. Moritz added a comment - Created an attachment (id=3775) Patch of the get-method
        Hide
        Mike Wilcox added a comment -

        We encountered this same bug as part of upgrading to Struts 1.1 nightly 20021105.
        In short, if the browser and server locales do not match, the struts
        JavascriptValidation tag fails to include the dynamic part of the javascript,
        and leaves the static part rendered on-screen.

        Our validation.xml has a single formset, with no specification of language,
        country or variant. Server was tomcat 4.0.4. Tested with servers set to locale
        en_US and en_GB. Tested with Mozilla and IE6 set to en_US and en_GB.

        The struts-validator example application showed the same symtoms on all
        combinations of server, browser and locale.

        The attached patch fixed our app. Haven't had time to check the validator app
        though.

        Show
        Mike Wilcox added a comment - We encountered this same bug as part of upgrading to Struts 1.1 nightly 20021105. In short, if the browser and server locales do not match, the struts JavascriptValidation tag fails to include the dynamic part of the javascript, and leaves the static part rendered on-screen. Our validation.xml has a single formset, with no specification of language, country or variant. Server was tomcat 4.0.4. Tested with servers set to locale en_US and en_GB. Tested with Mozilla and IE6 set to en_US and en_GB. The struts-validator example application showed the same symtoms on all combinations of server, browser and locale. The attached patch fixed our app. Haven't had time to check the validator app though.
        Hide
        James Turner added a comment -

        Cleaned up code to do essentially the same thing as the patch, but with a lot
        less code.

        James

        Show
        James Turner added a comment - Cleaned up code to do essentially the same thing as the patch, but with a lot less code. James
        Hide
        Gary Frost added a comment -
            • COM-308 has been marked as a duplicate of this bug. ***
        Show
        Gary Frost added a comment - COM-308 has been marked as a duplicate of this bug. ***
        Hide
        Niall Pemberton added a comment -

        Re-openned and the set to "Resolved Fixed" again to correct "resolution" which was lost in Bugzilla --> JIRA conversion

        Show
        Niall Pemberton added a comment - Re-openned and the set to "Resolved Fixed" again to correct "resolution" which was lost in Bugzilla --> JIRA conversion

          People

          • Assignee:
            Unassigned
            Reporter:
            Björn-H. Moritz
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development