Re: Using ActionForms and Entity CMP EJB

2003-06-11 Thread Sandeep Takhar
I would give some thought about what to do if you need
to internationalize. (This might be different than the
other hints given to you).  The normal course is the
ones suggested already.

You can subclass the message resources.  I haven't
tried any of this however, but it can take care of the
caching possibly.

sandeep
--- Giampiero De Ciantis
<[EMAIL PROTECTED]> wrote:
> 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]
> 


__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



RE: Using ActionForms and Entity CMP EJB

2003-06-11 Thread Mike Jasnowski
I should add, you can use the BeanUtils class to perform many bean-oriented
functions like copying properties between two classes, or retrieving
properties. Look at BeanUtils.copyProperties() for this.

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


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:




This is just a simple value of course, to do a collection you can use the
 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]



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



RE: Using ActionForms and Entity CMP EJB

2003-06-11 Thread Mike Jasnowski
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:




This is just a simple value of course, to do a collection you can use the
 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]



Re: Using ActionForms and Entity CMP EJB

2003-06-11 Thread Giampiero De Ciantis
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]



RE: Using ActionForms and Entity CMP EJB

2003-06-11 Thread Mike Jasnowski
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]