> The preferences for Strings in form beans is to deal with bad 
> user input
> (such as typing "1a3" into a text field destined to be an 
> integer).  Any
> solution that does not redisplay the bad data that the user 
> typed (just
> like every GUI program in the world does it) is not acceptable, IMHO.
> 
I completely agree.  It took me a while to come around to that, but I
now appreciate the value in the String-based approach.

> One approach to migrating the data out of the form bean and 
> into the model
> bean would be to grab all the properties out into a Map (perhaps by
> calling PropertyUtils.describe()) and then using
> BeanUtils.populate() to copy these values into your model 
> bean.  This will
> perform String->whatever conversions for you as it goes.
> 
I'll try this method.  It sounds interesting.

> I'd certainly be interested in seeing how you've approached this.
> 
I think I'm going to "Struts-ify" our pattern and see if I can get it to
work.  If so, I'll post it here for review.

Greg

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

Reply via email to