Joined: Jun 04, 2008
I prepare filling the jsp page with:
SomeForm someForm = new SomeForm(); httpServletRequest.setAttribute("SomeForm", someForm);
SomeForm has the attribute attDoub type double
in .jsp page i have the text field: <td><html:text property="attDoub" styleId="attDoub" size="14"/></td>
P.S. I tried with value="" but it permanently changes the value of property
Joined: Aug 06, 2008
What about starting with a String and converting to Double after-the-fact?
Joined: Feb 15, 2005
I agree with Shawn's suggestion. Struts 1 does not have good support for property types other than String or boolean in ActionForm beans. Another disadvantage of using a double type is that if the user enters a value that will not convert to a double and you redisplay the page, the value will be displayed as "0.0" rather than the actual value entered by the user.