A comment was made a few days back that this dicussion (of DTOs vs
ActionForms) comes up every two weeks.  I think this is for 2
reaons.  The first is that it is clearly the most confusing part of
Struts.  Second, I don't think there is a single definitive example
of this yet.  I believe that Matt Raible's appfuse is very close,
yet it doesn't have an example of all the basic cases just yet.  In
short, it would be nice to see an example of a nested ActionForm
using struts nested extension and a form which accepts a date input.

Another comment was that
http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp
seemed like a nice solution.  I agree and disagree.  I agree because
it definitely handles things how they should be handled but I
disagree because it already exists, and it is
BeanUtils.copyProperties.  You can register any convertor you want
with BeanUtils and therefore the framework is already in place.

So onto my question.  Matt, you mentioned that you only use
UserFormEx (or an extended version of your String version of your
DTO) when you have indexed properties, custom validation or the need
for a reset() method.  Would you agree you would also need one if
you had a time input and a date input and you wanted to a get method
which retrieved a datetime object?  I would assume you would have
two fields in the form, time and date, and then the get method on
the ActionForm would combine these two to produce a parsable date
which the convertor could handle.  Does that make sense?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
It is not enough to succeed.  Others must fail.  
 -- Gore Vidal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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

Reply via email to