struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John M. Corro" <john.co...@cornerstone.net>
Subject Re: Form -> Bean conversion
Date Fri, 15 Feb 2002 21:39:07 GMT
Also, forgot to ask....if "propertyOfBean" were of type 'java.util.Date' (or
any other non-string data type) have you found situations where you ran into
any conversion problems?

----- Original Message -----
From: "MacKellar, Kimberly" <Kimberly.MacKellar@tfn.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
Sent: Friday, February 15, 2002 3:22 PM
Subject: RE: Form -> Bean conversion


> You will have a getter and setter for the bean. Then in the jsp you will
> access the bean something like
> <html:text property="nameOfBean.propertyOfBean" size="10"/>
>
> Kim
>
> -----Original Message-----
> From: John M. Corro [mailto:john.corro@cornerstone.net]
> Sent: Friday, February 15, 2002 3:18 PM
> To: Struts Users Mailing List
> Subject: Re: Form -> Bean conversion
>
>
> Unless I'm misunderstanding, I'm not sure if that will do what we're
hoping
> for....
>
> When you use the html:form tag (and corresponding input tags from the html
> tag lib) on a JSP page there's error checking to make sure you have a
> corresponding get/set method in the ActionForm.  If we have the original
> bean as an instance variable in the ActionForm and have no other
> getters/setters hardcoded into the ActionForm, won't that cause a
> compile-time error on the JSP?
>
> ----- Original Message -----
> From: "MacKellar, Kimberly" <Kimberly.MacKellar@tfn.com>
> To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
> Sent: Friday, February 15, 2002 2:54 PM
> Subject: RE: Form -> Bean conversion
>
>
> > I have instances of beans within the ActionForm and then access them
with
> > the name of the bean and the name of the property in the bean when using
> > them in the JSP.  The only problem is having non-Strings in the bean.
You
> > need to do some sort of conversion within the ActionForm to get around
> this.
> >
> > Kimberly MacKellar
> >
> > -----Original Message-----
> > From: John M. Corro [mailto:john.corro@cornerstone.net]
> > Sent: Friday, February 15, 2002 2:53 PM
> > To: struts-user@jakarta.apache.org
> > Subject: Form -> Bean conversion
> >
> >
> > We have a bunch of existing beans that we'd like to use w/ ActionForms.
> For
> > each bean we'll need to obviously expose the getters/setters in the
> > corresponding ActionForm.  The ideal scenario we'd like to see happen is
> > prevent the ActionForms from having all the corresponding
getters/setters
> > hardcoded into it.  We're ok w/ coding the validate() method for each
> class
> > by hand, but we'd like to avoid having to code each ActionForm w/ a
> > getter/setter (even if it is templated out for us by a Struts plug in or
> > even a custom written batch file).
> >
> > Has anyone implemented something like this?
> >
> > --
> > 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>
>
>
>


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


Mime
View raw message