You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "françois-frédéric jean (JIRA)" <ji...@apache.org> on 2009/06/29 20:15:59 UTC

[jira] Created: (WW-3171) "double" and "Double" are not validated with the same decimal séparator

"double" and "Double" are not validated with the same decimal séparator
-----------------------------------------------------------------------

                 Key: WW-3171
                 URL: https://issues.apache.org/struts/browse/WW-3171
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.0.14
         Environment: Windows or Linux - Running under Tomcat 6.0 - fr_FR
            Reporter: françois-frédéric jean
            Priority: Critical


I had this strange behaviour.
I have two double in my Action (extends ActionSupport):
---------------------------
private double dbl1;
private Double dbl2;
---------------------------
With there respective getters and setters.

But, when I call the action with these two doubles (from a classical HTML form), I must put a "dot" for the double, and a "comma" for the Double as a decimal separator, 

I'm surprised by this behaviour .... Nothing particular was done (HTML form calling an action). I can't imagine what is the reason of this behaviour, so I raise it as a bug.

Regards

Francillo

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


[jira] Issue Comment Edited: (WW-3171) "double" and "Double" are not validated with the same decimal séparator

Posted by "Jorge Fernandez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47001#action_47001 ] 

Jorge Fernandez edited comment on WW-3171 at 10/31/09 8:53 AM:
---------------------------------------------------------------

Using the incorrect decimal separator with a Double value doesn't raise a validation error, instead it incorporates the fractional part of the number to the integral part of the number.

For example, writing 10.0 will became 100 instead of  raising the validation error "Invalid field value for field" as it does with double values.

action:
private Double doble=10.0;
    public Double getDoble(){
        return doble;
    }

    public void setDoble(Double doble){
        this.doble = doble;
    }

jsp:
<s:textfield key="doble" label="Double" />

This happens with Struts 2.1.8, Glashfish v2.1 and Linux with the spanish language.

If the action is called from the jsp and return to the jsp the value of doble multiplies * 10 in each call.

      was (Author: nether):
    Using the incorrect decimal separator with a Double value doesn't raise a validation error, instead it incorporates the fractional part of the number to the integral part of the number.

For example, writing 10.0 will became 100 instead of  raising the validation error "Invalid field value for field" as it does with double values.

action:
private Double doble=10.0;
    public Double getDoble(){
        return doble;
    }

    public void setDoble(Double doble){
        this.doble = doble;
    }

jsp:
<s:textfield key="doble" label="Double" />

If the action is called from the jsp and return to the jsp the value of doble multiplies * 10 in each call.
  
> "double" and "Double" are not validated with the same decimal séparator
> -----------------------------------------------------------------------
>
>                 Key: WW-3171
>                 URL: https://issues.apache.org/struts/browse/WW-3171
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.14
>         Environment: Windows or Linux - Running under Tomcat 6.0 - fr_FR
>            Reporter: françois-frédéric jean
>            Priority: Critical
>
> I had this strange behaviour.
> I have two double in my Action (extends ActionSupport):
> ---------------------------
> private double dbl1;
> private Double dbl2;
> ---------------------------
> With there respective getters and setters.
> But, when I call the action with these two doubles (from a classical HTML form), I must put a "dot" for the double, and a "comma" for the Double as a decimal separator, 
> I'm surprised by this behaviour .... Nothing particular was done (HTML form calling an action). I can't imagine what is the reason of this behaviour, so I raise it as a bug.
> Regards
> Francillo

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


[jira] Commented: (WW-3171) "double" and "Double" are not validated with the same decimal séparator

Posted by "Jorge Fernandez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47001#action_47001 ] 

Jorge Fernandez commented on WW-3171:
-------------------------------------

Using the incorrect decimal separator with a Double value doesn't raise a validation error, instead it incorporates the fractional part of the number to the integral part of the number.

For example, writing 10.0 will became 100 instead of  raising the validation error "Invalid field value for field" as it does with double values.

action:
private Double doble=10.0;
    public Double getDoble(){
        return doble;
    }

    public void setDoble(Double doble){
        this.doble = doble;
    }

jsp:
<s:textfield key="doble" label="Double" />

If the action is called from the jsp and return to the jsp the value of doble multiplies * 10 in each call.

> "double" and "Double" are not validated with the same decimal séparator
> -----------------------------------------------------------------------
>
>                 Key: WW-3171
>                 URL: https://issues.apache.org/struts/browse/WW-3171
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.14
>         Environment: Windows or Linux - Running under Tomcat 6.0 - fr_FR
>            Reporter: françois-frédéric jean
>            Priority: Critical
>
> I had this strange behaviour.
> I have two double in my Action (extends ActionSupport):
> ---------------------------
> private double dbl1;
> private Double dbl2;
> ---------------------------
> With there respective getters and setters.
> But, when I call the action with these two doubles (from a classical HTML form), I must put a "dot" for the double, and a "comma" for the Double as a decimal separator, 
> I'm surprised by this behaviour .... Nothing particular was done (HTML form calling an action). I can't imagine what is the reason of this behaviour, so I raise it as a bug.
> Regards
> Francillo

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


[jira] Updated: (WW-3171) "double" and "Double" are not validated with the same decimal séparator

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

Musachy Barroso updated WW-3171:
--------------------------------

    Fix Version/s: 2.2.0

> "double" and "Double" are not validated with the same decimal séparator
> -----------------------------------------------------------------------
>
>                 Key: WW-3171
>                 URL: https://issues.apache.org/struts/browse/WW-3171
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.14
>         Environment: Windows or Linux - Running under Tomcat 6.0 - fr_FR
>            Reporter: françois-frédéric jean
>            Priority: Critical
>             Fix For: 2.2.0
>
>
> I had this strange behaviour.
> I have two double in my Action (extends ActionSupport):
> ---------------------------
> private double dbl1;
> private Double dbl2;
> ---------------------------
> With there respective getters and setters.
> But, when I call the action with these two doubles (from a classical HTML form), I must put a "dot" for the double, and a "comma" for the Double as a decimal separator, 
> I'm surprised by this behaviour .... Nothing particular was done (HTML form calling an action). I can't imagine what is the reason of this behaviour, so I raise it as a bug.
> Regards
> Francillo

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


[jira] Issue Comment Edited: (WW-3171) "double" and "Double" are not validated with the same decimal séparator

Posted by "Jorge Fernandez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-3171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47001#action_47001 ] 

Jorge Fernandez edited comment on WW-3171 at 10/31/09 9:39 AM:
---------------------------------------------------------------

Using the incorrect decimal separator with a Double value doesn't raise a validation error, instead it incorporates the fractional part of the number to the integral part of the number.

For example, writing 10.0 will became 100 instead of  raising the validation error "Invalid field value for field" as it does with double values.

action:
private Double doble=10.0;
    public Double getDoble(){
        return doble;
    }

    public void setDoble(Double doble){
        this.doble = doble;
    }

jsp:
<s:textfield key="doble" label="Double" />

If the action is called from the jsp and return to the jsp the value of doble multiplies * 10 in each call.

This happens with Struts 2.1.8, Glashfish v2.1 and Linux with the spanish language.

      was (Author: nether):
    Using the incorrect decimal separator with a Double value doesn't raise a validation error, instead it incorporates the fractional part of the number to the integral part of the number.

For example, writing 10.0 will became 100 instead of  raising the validation error "Invalid field value for field" as it does with double values.

action:
private Double doble=10.0;
    public Double getDoble(){
        return doble;
    }

    public void setDoble(Double doble){
        this.doble = doble;
    }

jsp:
<s:textfield key="doble" label="Double" />

This happens with Struts 2.1.8, Glashfish v2.1 and Linux with the spanish language.

If the action is called from the jsp and return to the jsp the value of doble multiplies * 10 in each call.
  
> "double" and "Double" are not validated with the same decimal séparator
> -----------------------------------------------------------------------
>
>                 Key: WW-3171
>                 URL: https://issues.apache.org/struts/browse/WW-3171
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.0.14
>         Environment: Windows or Linux - Running under Tomcat 6.0 - fr_FR
>            Reporter: françois-frédéric jean
>            Priority: Critical
>
> I had this strange behaviour.
> I have two double in my Action (extends ActionSupport):
> ---------------------------
> private double dbl1;
> private Double dbl2;
> ---------------------------
> With there respective getters and setters.
> But, when I call the action with these two doubles (from a classical HTML form), I must put a "dot" for the double, and a "comma" for the Double as a decimal separator, 
> I'm surprised by this behaviour .... Nothing particular was done (HTML form calling an action). I can't imagine what is the reason of this behaviour, so I raise it as a bug.
> Regards
> Francillo

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