I have a working case with this declaration :
private Float latitude; and getXxx setXxx.

And in the JSP : <s:textfield key="latitude" />

Using Struts 2.1.8.1

Cimballi


2010/2/9 BlackKnight <wwwwar3...@gmail.com>:
> Hi,
>
> Just curious,
>
> Lib Version:
> ognl 2.6.11/Struts2.1.6,
>
> Initial setting:
> I have a float variable utm1 in my java model class, the initial value
> is set to to 0f,
>
> Problem Desc:
> when submitting the form, struts2 throw a error something like "can't
> find the setter methods SetUtm1(String)".
>
> Debug and trace info:
> After the submitting, struts2 call ognl to set value of utm1, first ognl
> look up for a converter to convert the para type(String) to the java
> class type(Java.lang. float). However, there isn't any converter handle
> such kind of convertion. So the ognl try to treat the para as a string
> and apply the SetUtm1(String) methods.
>
> Question:
> Is it true that ognl didn't handle convertion from string to float? How
> do you guys handle float variable in struts2 form?
>
> Any comments? Thanks
>
>
> Frank
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to