There is no need to add the below into your xwork,xml. The necessary
<result-types> and <interceptor> are already defined in webwork-default.xml,
The line <include file="webwork-default.xml"/> in xwork.xml includes all the
definitions in webwork-default.xml.

Did you activate it specifically for that action ? Just adding the below to
xwork.xml only defined the interceptors. You have to create the
relationships between which actions and which interceptors as well.

<action name="newPage" class="com.webs4.NewPage">
  <result name="success" type="chain">
    <param name="actionName">browse</param>
  </result>
  <interceptor-ref name="chain"/>
</action>

----- Original Message -----
From: "Robert Douglass" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 05, 2003 1:12 PM
Subject: RE: [OS-webwork] Action Chaining: passing parameters


> >>Is ChainingInterceptor activated ?
> No, in fact it wasn't. Now I've added this to xwork.xml, but it still
> doesn't work.
>
> <result-types>
>             <result-type name="chain"
> class="com.opensymphony.xwork.ActionChainResult"/>
>         </result-types>
>         <interceptors>
>             <interceptor name="chain"
> class="com.opensymphony.xwork.interceptor.ChainingInterceptor"/>
>
> Logging output:
>
> 2003-10-05 06:09:23,355 DEBUG com.opensymphony.xwork.DefaultActionProxy
> [HttpProcessor[80][4]] - Creating an DefaultActionProxy for namespace  and
> action name newPage
> 2003-10-05 06:09:23,365 INFO
> com.opensymphony.xwork.interceptor.LoggingInterceptor
> [HttpProcessor[80][4]] - Starting execution stack for action newPage
> 2003-10-05 06:09:23,385 DEBUG
> com.opensymphony.xwork.interceptor.StaticParametersInterceptor
> [HttpProcessor[80][4]] - Setting static parameters {}
> 2003-10-05 06:09:23,395 DEBUG
> com.opensymphony.xwork.interceptor.ParametersInterceptor
> [HttpProcessor[80][4]] - Setting params {id=[Ljava.lang.String;@190ffa7}
> 2003-10-05 06:09:25,788 DEBUG com.opensymphony.xwork.ActionChainResult
> [HttpProcessor[80][4]] - Chaining to action browse
> 2003-10-05 06:09:25,798 DEBUG com.opensymphony.xwork.DefaultActionProxy
> [HttpProcessor[80][4]] - Creating an DefaultActionProxy for namespace  and
> action name browse
> 2003-10-05 06:09:25,808 INFO
> com.opensymphony.xwork.interceptor.LoggingInterceptor
> [HttpProcessor[80][4]] - Starting execution stack for action browse
> 2003-10-05 06:09:25,828 DEBUG
> com.opensymphony.xwork.interceptor.StaticParametersInterceptor
> [HttpProcessor[80][4]] - Setting static parameters {}
> 2003-10-05 06:09:25,838 DEBUG
> com.opensymphony.xwork.interceptor.ParametersInterceptor
> [HttpProcessor[80][4]] - Setting params {id=[Ljava.lang.String;@190ffa7}
> 2003-10-05 06:09:26,469 DEBUG
> com.opensymphony.webwork.dispatcher.ServletDispatcherResult
> [HttpProcessor[80][4]] - Forwarding to location /error.jsp
> 2003-10-05 06:09:26,479 INFO
> com.opensymphony.xwork.interceptor.LoggingInterceptor
> [HttpProcessor[80][4]] - Finishing execution stack for action browse
> 2003-10-05 06:09:26,499 INFO
> com.opensymphony.xwork.interceptor.TimerInterceptor
[HttpProcessor[80][4]] -
> Processed action browse in 691ms.
> 2003-10-05 06:09:26,509 INFO
> com.opensymphony.xwork.interceptor.LoggingInterceptor
> [HttpProcessor[80][4]] - Finishing execution stack for action newPage
> 2003-10-05 06:09:26,519 INFO
> com.opensymphony.xwork.interceptor.TimerInterceptor
[HttpProcessor[80][4]] -
> Processed action newPage in 3154ms.
>
> > I've got two actions, newPage and browse, that both have a template
> > parameter. I set template in newPage (see below), and it chains to
browse,
> > but template value has been lost. There must be a way to pass this
> parameter
> > from within the newPage action, but I was surprised that simply setting
> the
> > value didn't work. The values that were set from the URL parameters get
> > passed on, though, I noticed.
> >
> > -Robert Douglass
> >
> > xwork.xml:
> > <action name="newPage" class="com.webs4.NewPage">
> >             <result name="success" type="chain">
> >                 <param name="actionName">browse</param>
> >             </result>
> >
> > NewPage.java:
> > public String execute() throws Exception {
> > if (pageToClone == null) {
> > template = "SelectPage";
> > }
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to