You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Jenkins <aj...@venetica.com> on 2001/06/06 16:11:09 UTC

Compositing Actions

Is there a straightforward way to locate and invoke an Action from within
the perform() method of another Action?  The reason I would like to do this
is to create a "composite" Action from a number of other "component"
Actions--these component Actions must be available individually in the
Struts application, however I would like to provide a composite Action that
requires objects placed in the request attributes by the component Actions.

Thanks in advance,

--Andy

Andy Jenkins
Venetica Corporation (www.venetica.com)
Voice: 704.926.3080
ajenkins@venetica.com


Re: Compositing Actions

Posted by Oleg V Alexeev <go...@penza.net>.
Hello Andrew,

May be another way is solution of your problem... Now I work under
extension of struts to support so named 'bean-factories'. Idea is to
create pluggable framework to support mechanism of data bean
generation (for example, retrieved from database) based on
declarations in struts-config.xml.
There are some terms in my concept -
 bean-factory - java class intended to create beans
 bean-template - bean description (type, name, parameters needed to
                 create such bean)
 bean-registration - additional tag inside action mapping - creates
                 link between bean-template and bean-factory
                 
 BeanFactoryServlet extends ActionServlet and uses information from
 struts-config.xml to create beans from bean-registraions list in
 action and store this beans in request of session scope. All this
 beans avaiable to jsp-page to show this beans. Every action can hold
 list of bean-registrations and every of such registrations can use
 anyone factory and anyone bean-template.

I publish first version with sample web-application some days ago -
you can download it and review for your needs.

http://www.sura.ru/~gonza/bean-factory

Wednesday, June 06, 2001, 6:11:09 PM, you wrote:

AJ> Is there a straightforward way to locate and invoke an Action from within
AJ> the perform() method of another Action?  The reason I would like to do this
AJ> is to create a "composite" Action from a number of other "component"
AJ> Actions--these component Actions must be available individually in the
AJ> Struts application, however I would like to provide a composite Action that
AJ> requires objects placed in the request attributes by the component Actions.

AJ> Thanks in advance,

AJ> --Andy

AJ> Andy Jenkins
AJ> Venetica Corporation (www.venetica.com)
AJ> Voice: 704.926.3080
AJ> ajenkins@venetica.com



-- 
Best regards,
 Oleg                            mailto:gonza@penza.net