struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yasser Zamani (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4896) Bug after Struts 2.5.10.1: Using Float values in Form
Date Thu, 23 Nov 2017 08:56:01 GMT

    [ https://issues.apache.org/jira/browse/WW-4896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16264010#comment-16264010
] 

Yasser Zamani commented on WW-4896:
-----------------------------------

[~sfechner], I think you can try below in your {{struts.xml}} :
{code:xml}
<constant name="struts.locale" value="en_US" />
{code}
which set default locale for Struts globally to en_US for example. could you please try and
let me know?

There is also [i18n-interceptor|https://struts.apache.org/core-developers/i18n-interceptor.html]
which you may be interested.

> Bug after Struts 2.5.10.1: Using Float values in Form
> -----------------------------------------------------
>
>                 Key: WW-4896
>                 URL: https://issues.apache.org/jira/browse/WW-4896
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core, Core Actions
>    Affects Versions: 2.5.12
>            Reporter: Fechner
>             Fix For: 2.5.14
>
>         Attachments: float.png
>
>
> *Situation:*
> *Webfrontend form:*
> {code:html}
> 	<s:textfield key="pvFormular.ost" id="ost" label="%{getText('produkt.ost')}" value="%{#session.prodWerteObjekt.ost}"

> 		requiredLabel="true" cssClass="input_text_4" onchange="changedTab2()" tooltip="%{getText('produkt.ag.tooltip.koordinate')}"
>     	tooltipIconPath="/images/question.gif"/>
> {code}
> Input into the form: 10.0
> *Incoming Value in Action:*
> {code:java}
> 	private ProdVarianteWerte pvFormular =new ProdVarianteWerte();
>   ...
>   log.info("=====ost="+pvFormular.getOst());  
> {code}
> *Output in Logfile:*
> {noformat}
> [INFO ] 2017-11-21 14:28:47.133 [http-nio-8080-exec-416] [speichernaendtab2datei]  ProduktAGAction,Zeile:511
 - =====ost=100.0
> {noformat}
> *Structure of Bean "ProdVarianteWerte":*
> {code:java}
> package de.dwd.katalog.beans;
> import ...
> public class ProdVarianteWerte {
> ....
> 		private float ost;
> ..
> 		public float getOst() {
> 			return ost;
> 		}
> 		public void setOst(float ost) {
> 			this.ost = ost;
> 		}
> ...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message