The recommended pattern is to have only string properties on your
ActionForm classes that are mapped to typed data in your model.

You can write a component to do #2 and register it with bean-utils,
but you for sure do not want to pass the action form into your model.

Larry


On 7/13/05, Lance Semmens <[EMAIL PROTECTED]> wrote:
> Is there a standard way of handling invalid user input in date / number
> fields etc. I can forsee 2 possible solutions.
> 1. Declare date properties on your form as java.lang.Strings and
> validate / parse them explicitely.
> 2. Declare date properties as java.util.Dates, have struts parse dates,
> check for null form properties and use request.getParameter() to see if
> an invalid date was entered.
> 
> I prefer option 2. Are there any libraries around to do this generically
> or another way that I haven't thought of? (NB i'm a newbie).
> 
> Thanks,
> Lance.
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to