By having a TO in my form bean , I still use validate and reset methods.

e.g.

Check validity of user.getName() in validate method

Where my jsp field is
<html-el:text  property="user.name" size="35" />

UserForm has

getUser() and setUser() methods

And as far as TOs are concerned they are auto-generated during build process

----- Original Message -----
From: "Yves Sy" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, August 26, 2004 1:16 PM
Subject: RE: ActionForm and Transfer Object


The problem with that approach is you'll end up putting your validation
code in your TO and you'll have to write your own error handling routine
too. If you use ActionForms, you can save time by taking advantage of
Struts' error handling mechanism via the validate() method and checkbox
handling via the reset() method.

Regards,
-Yves-

> -----Original Message-----
> From: Deepak [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 26, 2004 3:23 PM
> To: Struts Users Mailing List
> Subject: Re: ActionForm and Transfer Object
>
>  I like passing a TO into the ActionForm so it gets updated by the jsp
> submission and is ready for being sent back over to the business tier.
>
> ----- Original Message -----
> From: "Leandro Melo" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, August 25, 2004 11:26 PM
> Subject: Re: ActionForm and Transfer Object
>
>
> > Sure Rick, and "where should me do it" might be a good
> > discussion (like the one that we`re all going on right
> > now).
> >
> > A few months ago i had a similar discussion in a
> > forum.
> > Is someone is interested to hear more opinions, here
> > it is
> >
>
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=5
8&t=
> 002880
> >
> >
> >
> >  --- Rick Reumann <[EMAIL PROTECTED]> escreveu:
> > > Leandro Melo wrote:
> > > > Rick,
> > > > i agree with you, i also use BeanUtils to populate
> > > my
> > > > forms.
> > > > But, this doesn't go far way from having your
> > > > ActionForms dependent on your TOs (or CustomTOs,
> > > > doesn' t matter).
> > >
> > > Well I wouldn't say they are 'dependent' on each
> > > other except that it
> > > makes it easier if the property names match. Think
> > > about it, at some
> > > point you are always going to have some sort of
> > > binding match up going
> > > on. Something somewhere along the line has to bind a
> > > request parameter
> > > name (which is just a key in a Map) to the real
> > > business object
> > > property. You can devise different ways to do this
> > > and look at how other
> > > frameworks handle it, but somewhere this has to be
> > > done.
> > >
> > > --
> > > Rick
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> >
> >
> > _______________________________________________________
> > Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade!
> > http://br.acesso.yahoo.com/
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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




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

Reply via email to