Re: Struts 2 Type conversion

2009-03-25 Thread dusty
Seems like you have it down. Why is it kind of? It is only a really type conversion issue if you need to reconstruct the graph of Map>Bean>List from a string posted from a web page. mahanare wrote: > > kind of got a fix. > > here is my jsp content. > > > > >

Re: Struts 2 Type conversion

2009-03-25 Thread mahanare
kind of got a fix. here is my jsp content. mahanare wrote:

Re: Struts 2 Type conversion refuses 0.0 for a double?

2009-03-05 Thread markbeek
newton.dave wrote: > > I believe it was probably what's conventionally known as a "mistake". > It appears to have been resolved with XW-677. > Yep, looks like that will take care of it. Thanks. -- View this message in context: http://www.nabble.com/Struts-2-Type-conversion-refuses-0.0-for-a-

Re: Struts 2 Type conversion refuses 0.0 for a double?

2009-03-05 Thread Dave Newton
markbeek wrote: Can anyone (a) confirm this analysis of the source code, and (b) if so, explain why the decision was made to consider zero an invalid entry for a double property on a form field? I believe it was probably what's conventionally known as a "mistake". It appears to have been resol

Re: Struts 2 Type conversion refuses 0.0 for a double?

2009-03-04 Thread markbeek
I have a Struts2 action with a double property called "amount". No validation rules on the action as yet. When I enter "0.0" into the amount on the JSP page, it displays an "Invalid field value for field "amount"" error. --- I've encountered the same behavior. I've trac

Re: Struts 2 Type conversion refuses 0.0 for a double?

2009-01-30 Thread san-ho-zay
Thanks for your reply Lukasz. In practice, I should use BigDecimal to avoid rounding problems but it doesn't change the fact that 0.0 shouldn't be thrown up as an invalid conversion for a double. This works perfectly well, so I can't understand why Struts2 throws "0.0" out as an error ... public

Re: Struts 2 Type conversion refuses 0.0 for a double?

2009-01-29 Thread Lukasz Lenart
2009/1/30 san-ho-zay : > I have a Struts2 action with a double property called "amount". No validation > rules on the action as yet. Use big Double instead. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail:

Re: Struts 2 Type Conversion for properties of a List

2008-12-24 Thread Paweł Wielgus
Hi Titus, You can validate with annotations. best greetings, Pawel Wielgus 2008/12/24, Marsman : > > > newton.dave wrote: >> >> >>> if ( values[0] == null || values[0].length() == 0 >>> && values[0].equalsIgnoreCase("v.a.") >> || values[0].equalsIgnoreCase("various artists")) >> >>

Re: Struts 2 Type Conversion for properties of a List

2008-12-24 Thread Marsman
newton.dave wrote: > > >> if ( values[0] == null || values[0].length() == 0 >> && values[0].equalsIgnoreCase("v.a.") >         || values[0].equalsIgnoreCase("various artists")) > > This condition strikes me as odd... did you really mean "&&" there? > No, of course not. You found an o

Re: Struts 2 Type Conversion for properties of a List

2008-12-24 Thread Marsman
dusty wrote: > > You could create a special class for this property so you can use type > conversion but that seems ugly. > > You are better off using EL or a custom tag for rendering the property. > I thought about creating a new type (in Hibernate) for my "artists". But only for storing "v

Re: Struts 2 Type Conversion for properties of a List

2008-12-23 Thread dusty
you want to use the class name rather property name on your conversion file. com.mydomain.model.Artist=com.mydomain.converter.ArtistConverter You specify the property name when telling struts the Bean type for an entire collection. I don't think you can register Type Converters for a particul

Re: Struts 2 Type Conversion for properties of a List

2008-12-23 Thread Dave Newton
--- On Tue, 12/23/08, Marsman wrote: > >   > This isn't really type conversion, it's a toString. AFAIK type conversion is only an issue to/from forms. > if ( values[0] == null || values[0].length() == 0 > && values[0].equalsIgnoreCase("v.a.")         || values[0].equalsIgnoreCase("va

Re: Struts 2 type conversion and numbers

2007-07-30 Thread Art Krahenbuhl
Dale, Thanks for your fast reply. You pointed me in the right direction and I found a fix afterall! The issue is described here: http://jira.opensymphony.com/browse/XW-512 Upgrading XWork to 2.0.3+ fixes the problem. --Art DNewfield wrote: > > Art Krahenbuhl wrote: >> How can we get rid of

Re: Struts 2 type conversion and numbers

2007-07-30 Thread Dale Newfield
Art Krahenbuhl wrote: How can we get rid of the commas? I can't find any information on this issue. https://issues.apache.org/struts/browse/WW-1937 -Dale - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e