I have nearly the same think
but I use to create properties as Integer which avoid me
to make a call to Integer.valueOf()

Am I wrong ?


Sincerly
Xavier
> -----Message d'origine-----
> De : Andrew Hill [mailto:andrew.david.hill@;gridnode.com]
> Envoye : jeudi 31 octobre 2002 11:42
> A : Struts Users Mailing List
> Objet : RE: MVC Design: property in ActionForm or Bean with property in
> ActionForm ?
>
>
> Technically speaking, the ActionForm IS a bean.
> It's purpose is to represent the users input (which you can
> validate and if
> necessary redisplay for correction) before transferring in your action the
> (validated) values (with appropriate type conversion) to your business
> object and vice versa.
> Your BO itself may well be a bean too - such as your "BookBean" perhaps?
> The actionForm and the business object will of course have a very similar
> (often identical) set of properties, however they serve different
> purposes -
> for example you will note that while your BOs beans would have various
> property types (ie: int for pages etc...) you ActionForm will
> *usually* just
> be strings (some folk use bools for checkboxes though) - a result of it
> being a place to store the string data submitted in the request
> or read from
> the BO ready for display in the form...
>
> -----Original Message-----
> From: Marcus Biel [mailto:Marcus.Biel@;bmw.de]
> Sent: Thursday, October 31, 2002 18:20
> To: [EMAIL PROTECTED]
> Subject: MVC Design: property in ActionForm or Bean with property in
> ActionForm ?
>
>
> What's better:
>
> To have a bean let's say "BookBean.java"
> that has got a String title, author, pages
>
> and an Actionform that uses this BookBean,
>
> or is it better to have an ActionForm
> that has a String title, author, pages.
>
> Imho it's much faster and easier to have your properties in your
> ActionForm,
>
> but I bet according to the MVC design its recommend to use Beans.
>
>
> Right ?
>
>
> thx,
>
> marcus
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@;jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to