[ http://jira.andromda.org/browse/BPM-218?page=comments#action_11797 ]
     
Walter Itamar MourĂ£o commented on BPM-218:
------------------------------------------

The "Long" behaves differently because the "default" server behavior of struts 
when parsing Strings to non primitive class numbers is creating the number 
class instance (Long in this case) with the value 0 (new Long(0)) when occurs a 
parsing error. To change this behavior you must use the 
"org.apache.commons.beanutils.converters" package and set the desired defaults 
instead using the Struts one.
My solution: I created a set of validators checking against a specific class 
instance to see if the Long instance created by the converter is valid or a is 
"flag", so the validator can throw the correct exception.

> Long validation is ignored
> --------------------------
>
>          Key: BPM-218
>          URL: http://jira.andromda.org/browse/BPM-218
>      Project: Bpm4Struts Cartridge
>         Type: Bug
>     Reporter: stephane le peutrec
>     Assignee: Wouter Zoons
>     Priority: Minor
>  Attachments: testLong.zip
>
> The validator "long" doesn't seem to work correctly. Indeed when a field of 
> type Long is filled with a string, no error occurs and the field of the form 
> is null in the controller. (cf. 
> http://galaxy.andromda.org/forum/viewtopic.php?t=435&highlight=validation)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Andromda-devel mailing list
Andromda-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to