You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Wang Sheng (JIRA)" <ji...@apache.org> on 2007/05/21 07:13:43 UTC

[jira] Created: (WW-1937) javascript validation error when int range above 1000

javascript validation error when int range above 1000
-----------------------------------------------------

                 Key: WW-1937
                 URL: https://issues.apache.org/struts/browse/WW-1937
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.6
            Reporter: Wang Sheng


we use javascript validation, check int range
min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.

struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
${validator.min} should be ${validator.min?c}
${validator.max} should be ${validator.max:c}

there maybe lots other problems

this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1937) javascript validation error when int range above 1000

Posted by "Ryan Aylward (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42581 ] 

Ryan Aylward commented on WW-1937:
----------------------------------

This issues is still occurring in 2.0.9. We are using 2.0.9 and we are still getting the comma separator which causes javascript to evaluate the integer incorrectly. 

For reference, here's what we have in our pom which indicates we are using 2.0.9
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <version>2.0.9</version>
        </dependency>

Here's a snippet of the javascript that was generated for an int range check...
 if (form.elements['inputField']) {
    field = form.elements['inputField'];
    var error = "Invalid range for input field.";
    if (field.value != null) {
        if (parseInt(field.value) <  2,003 ||  parseInt(field.value) > 5,000) {
            addError(field, error);
            errors = true;
        }
    }
}

> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>             Fix For: 2.0.9
>
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1937) javascript validation error when int range above 1000

Posted by "Juan Vicente Castelló (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42859 ] 

Juan Vicente Castelló commented on WW-1937:
-------------------------------------------

This is still occurring in 2.0.11.
 in form-close-validation.ftl ${validator.min} was changed with ${validator.min?string} and should be ${validator.min?c}

> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>             Fix For: 2.0.9
>
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-1937) javascript validation error when int range above 1000

Posted by "Anonymous (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]


    Status: Resolved  (was: Closed)

> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>             Fix For: 2.0.9
>
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-1937) javascript validation error when int range above 1000

Posted by "Wang Sheng (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wang Sheng updated WW-1937:
---------------------------

    Description: 
we use javascript validation, check int range
min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.

struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
${validator.min} should be ${validator.min?c}
${validator.max} should be ${validator.max?c}

there maybe lots other problems

this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
not test 2.0.7

  was:
we use javascript validation, check int range
min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.

struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
${validator.min} should be ${validator.min?c}
${validator.max} should be ${validator.max:c}

there maybe lots other problems

this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
not test 2.0.7


> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WW-1937) javascript validation error when int range above 1000

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes closed WW-1937.
----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0.10)
                   2.0.9

This was fixed in XWork ticket XW-512:

http://jira.opensymphony.com/browse/XW-512

Upgrading to Struts 2.0.9 which includes XWork 2.0.4 should fix the problem.

> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>             Fix For: 2.0.9
>
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1937) javascript validation error when int range above 1000

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41079 ] 

Don Brown commented on WW-1937:
-------------------------------

This should be fixed in xwork, but when 2.0.8 comes out, give it a try (or one of the nightlies) to see if it is still an issue.

> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>             Fix For: 2.0.9
>
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-1937) javascript validation error when int range above 1000

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown updated WW-1937:
--------------------------

    Fix Version/s: 2.0.9

> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>             Fix For: 2.0.9
>
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-1937) javascript validation error when int range above 1000

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-1937:
-----------------------------

    Fix Version/s:     (was: 2.0.9)
                   2.0.10

Moving to 2.0.10 so that 2.0.9 can be released.

> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>             Fix For: 2.0.10
>
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-1937) javascript validation error when int range above 1000

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Husted updated WW-1937:
---------------------------

    Fix Version/s:     (was: 2.0.9)
                   Future

> javascript validation error when int range above 1000
> -----------------------------------------------------
>
>                 Key: WW-1937
>                 URL: https://issues.apache.org/struts/browse/WW-1937
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Wang Sheng
>             Fix For: Future
>
>
> we use javascript validation, check int range
> min or max above 1000(include), the jsp was rendered as "1,000", so it can not do validate correctly.
> struts2-core-2.0.6.jar\template\xhtml\form-close-validation.ftl
> ${validator.min} should be ${validator.min?c}
> ${validator.max} should be ${validator.max?c}
> there maybe lots other problems
> this bug also affects webwork 2.2.2/2.2.4, and struts 2.0.0 - 2.0.6
> not test 2.0.7

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.