struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Tedone" <mted...@jemos.org>
Subject Re: How to access the ActionForm instance from within the JSP
Date Sun, 08 Jun 2003 20:35:15 GMT
Put the form which contains the properties you want to reuse in a session
scope, and then from the JSP use this form.

Marco
----- Original Message ----- 
From: "Carlos Saraiva" <r1100s@carlossaraiva.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Sunday, June 08, 2003 9:27 PM
Subject: RE: How to access the ActionForm instance from within the JSP


> OK, here's the deal. I've got a JSP with a form that's included in another
> JSP. When the imbedded JSP gets called, I want the fields in the form to
be
> populated by the attributes of the object it represents. The form object
> doesn't get called before the JSP is instantiated. I'm looking for a way
to
> do this.
>
> --
> Best regards,
> Carlos Saraiva
> Raleigh, NC
> http://www.carlossaraiva.com mailto:saraiva@pobox.com
>
> > -----Original Message-----
> > From: Marco Tedone [mailto:mtedone@jemos.org]
> > Sent: Sunday, June 08, 2003 4:21 PM
> > To: Struts Users Mailing List
> > Subject: Re: How to access the ActionForm instance from within the JSP
> >
> >
> > Ok, which functionalities do those method perform? Have you thought to
> > personal taglibs? The ActionForm should contain only getter/setter and
> > validation methods. *Work* methods on data could be easily
> > grouped somewhere
> > else. The logic of the framework is request -> ?action(form) ->
> > presentation, thus doing something like presentation-> form
> > doesn't seem to
> > me the right way to perform some logic in your application. IMHO, data
> > should arrive to the JSP already formatted and ready to be
> > displayed. What I
> > see as normal, is to have scope attributes to manage from within your
JSP;
> > to avoid code you can write custom tags.
> >
> > Marco
> > ----- Original Message -----
> > From: "Carlos Saraiva" <r1100s@carlossaraiva.com>
> > To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > Sent: Sunday, June 08, 2003 9:13 PM
> > Subject: RE: How to access the ActionForm instance from within the JSP
> >
> >
> > > > > Hi,
> > > > >
> > > > > I need to call methods of the ActionForm instance from within
> > > > the JSP. Can
> > > > > someone please tell me how to do this? I've tried defining
> > a bean, but
> > I
> > > > get
> > > > > a different instance of the class.
> > >
> > > >
> > > > Which kind of methods do you need to call?
> > > >
> > > > Marco
> > >
> > > Methods written by myself.
> > >
> > > --
> > > Best regards,
> > > Carlos Saraiva
> > > Raleigh, NC
> > > http://www.carlossaraiva.com mailto:saraiva@pobox.com
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>




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


Mime
View raw message