Here you go:
VelocityAction action = (VelocityAction) ActionLoader
.getInstance().getInstance("CreateReactions");
action.doPerform(data, context);
However, Oron is right.. You should have VERY little code in an action as
actions are hard to unit test. (You are writing unit tests right :-) )
Eric
> -----Original Message-----
> From: Vjeran Marcinko [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 01, 2004 4:30 PM
> To: Turbine Users List
> Subject: Re: Action->Action flow
>
>
> Hi Oron.
>
> I am aware that such way only small amount of code will be repeated
> (doService and setting template), but I really wanted not to have any
> copies, but to reuse Action class maximally.
> Anyway, as I have understanding of Turbine, flow from :
> Action->Action
> Screen->Action
> Screen->Screen
> isn't possible.
> Only Action->Screen is allowed, which is limiting in some cases.
>
> Thanx anyway for advice.
>
> ----- Original Message -----
> From: "Oron O Adam" <[EMAIL PROTECTED]>
> To: "'Turbine Users List'" <[EMAIL PROTECTED]>
> Sent: Thursday, April 01, 2004 4:24 PM
> Subject: RE: Action->Action flow
>
>
> > Hi Vjeran
> >
> > Seems to me if you make your actions thin and put the logic in
> some joint
> > service class you will have
> >
> > Action a code
> > {
> > if(need to display screen)
> > {
> > setTemplate(additional screen)
> > }
> > else // no need for screen
> > {
> > doService
> > setTemplate(some final screen)
> > }
> >
> > }
> >
> > Action b code
> > {
> > doService()
> > settemplate(some final screen)
> > }
>
>
> ---------------------------------------------------------------------
> 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]