This should work. But in order for it to work the ToggleNotification class
must have a method getCompanyId() and Details must have a method
setCompanyId(...), and the types of the result/parameter must match. When
actions are chained then all properties with getXXX methods are called on
the first action, and then the corresponding setXXX method is called on the
second action.
The HTTP parameters are not set again on the second action, if that is what
you thought. (At least I do not think they are set, without looking at the
source now).

Cheers,

Dick Zetterberg

----- Original Message -----
From: "Chris Widhelm" <[EMAIL PROTECTED]>
To: "OpenSymphony Webwork" <[EMAIL PROTECTED]>
Sent: Wednesday, February 04, 2004 6:56 PM
Subject: [OS-webwork] WW1 Chaining Question


> I know that this has been addressed before, however, I don't think it
> has ever been followed to conclusion.
>
> In WW1 I am trying to chain two actions together (See actions.xml snipet
> below for action configuration).  Details.action retrieves information
> from a database based on a companyId that is passed into it as a
> parameter.  ToggleNotification is only invoked from Details and has a
> parameter of companyId.  When it is invoked it modifys values in the
> database and then chains to Details.action.
>
> One would think that since both actions require the 'companyId'
> parameter and that ToggleNotification is chained to Details that they
> would both complete successfuly.  However, Details actually throws a
> NullPointerException because 'companyId' is never set when
> Details.action is executed in this particular chain.
>
> Is this expected behavior.  Is there a work around short have having to
> make the Details action ServletRequestAware and get the parameters myself?
>
> Thank you,
>
> Chris
>
> <!-- actions.xml -->
> <action name="Details" alias="Details">
>     <view name="success">details.jsp</view>
> </action>
>
> <action name="ToggleNotification" alias="ToggleNotification">
>     <view name="success">Details.action</view>
> </action>
>




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to