In your struts config, you associate the actionform with an action.  In your
action class, after you are finished populating the form, you return a
forward (Defined in your struts config for that action) which forwards to a
JSP. (Struts will take care of stuffing that bean into the session)  In that
JSP you can use Struts, JSTL , etc. tags to access the ActionForm as a
JavaBean. So for example if you had a form named "EJBDataForm", with a
property of "name", in your JSP you could write that value as:


<bean:write name="EJBDataForm" property="name"/>

This is just a simple value of course, to do a collection you can use the
<iterate> tag, to loop over the collection and extract each element.


-----Original Message-----
From: Giampiero De Ciantis [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 1:18 PM
To: Struts Users Mailing List
Subject: Re: Using ActionForms and Entity CMP EJB


Once you have populated the form using the Action, how do you send it back
to the user? Do you have an example of this method of population (can be
really simple, doesn't need to use EJBs or anything)?



----- Original Message -----
From: "Mike Jasnowski" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 1:10 PM
Subject: RE: Using ActionForms and Entity CMP EJB


> You can populate an ActionForm in an Action (Using the EJB data), in the
> actionform one of the properties can be a collection type such as List.
>
> -----Original Message-----
> From: Giampiero De Ciantis [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 11, 2003 1:08 PM
> To: [EMAIL PROTECTED]
> Subject: Using ActionForms and Entity CMP EJB
>
>
> I have an EJB that returns a collection of categories (Strings) that I
want
> to display on my page as links. I can't seem to figure out what the
pattern
> is for bringing a Collection object from the data-tier to the Web-Tier
using
> Struts.
>
> Thanks
>
> -Gp
>
> ---------------------------------------------------------------------
> 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