You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Patrick Aikens <pa...@gmail.com> on 2009/04/03 17:53:29 UTC
Struts 2.1.6, Convention plugin, and Scope interceptor
I'm trying to go with an all-annotation based configuration for a
project I'm working on, and now have the desire to use a scope
interceptor in my app. The following is an example of my current
ideas, but I'm not sure it's working correctly (I have a sneaking
suspicion that I'm modifying the stack to add a second scope
interceptor for the start and end actions rather than overriding the
params for the existing one). Does this work, or do I need to use XML
to define the start and end actions like in the older Zero
Config/Codebehind days? I'm planning on using a single class to
implement all the actions for this workflow (the number of screens in
the workflow is dynamic, which is one of the reasons I want a scope
interceptor)
Also, I want to do this in "pure" struts 2 without a third party plugin
@InterceptorRefs({
@InterceptorRef(value="scope", params={"session", "model", "key",
"customModel"}),
@InterceptorRef("defaultStack")
})
public class ManageCategoryAction extends ActionSupport
implements ModelDriven<Map<String, Object>> {
@Action(value="startCustomizationWorkflow",
interceptorRefs=@InterceptorRef(value="scope", params={"type", "start"})
)
public String startCustomizationWorkflow() {
{...}
}
@Action(value="endCustomizationWorkflow",
interceptorRefs=@InterceptorRef(value="scope", params={"type", "end"})
)
public String startCustomizationWorkflow() {
{...}
}
@Action(value="nextCustomizationWorkflowScreen")
public String startCustomizationWorkflow() {
{...}
}
@Action(value="prevCustomizationWorkflowScreen")
public String startCustomizationWorkflow() {
{...}
}
}
--
SELECT * FROM users WHERE clue > 0
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2.1.6, Convention plugin, and Scope interceptor
Posted by dusty <du...@yahoo.com>.
I am not sure that I understand your problem if there is one.
-------
I have that shirt
Patrick Aikens wrote:
>
> I'm trying to go with an all-annotation based configuration for a
> project I'm working on, and now have the desire to use a scope
> interceptor in my app. The following is an example of my current
> ideas, but I'm not sure it's working correctly (I have a sneaking
> suspicion that I'm modifying the stack to add a second scope
> interceptor for the start and end actions rather than overriding the
> params for the existing one). Does this work, or do I need to use XML
> to define the start and end actions like in the older Zero
> Config/Codebehind days? I'm planning on using a single class to
> implement all the actions for this workflow (the number of screens in
> the workflow is dynamic, which is one of the reasons I want a scope
> interceptor)
>
> Also, I want to do this in "pure" struts 2 without a third party plugin
>
> @InterceptorRefs({
> @InterceptorRef(value="scope", params={"session", "model", "key",
> "customModel"}),
> @InterceptorRef("defaultStack")
> })
> public class ManageCategoryAction extends ActionSupport
> implements ModelDriven<Map<String, Object>> {
>
> @Action(value="startCustomizationWorkflow",
> interceptorRefs=@InterceptorRef(value="scope", params={"type",
> "start"})
> )
> public String startCustomizationWorkflow() {
> {...}
> }
>
> @Action(value="endCustomizationWorkflow",
> interceptorRefs=@InterceptorRef(value="scope", params={"type",
> "end"})
> )
> public String startCustomizationWorkflow() {
> {...}
> }
>
> @Action(value="nextCustomizationWorkflowScreen")
> public String startCustomizationWorkflow() {
> {...}
> }
>
> @Action(value="prevCustomizationWorkflowScreen")
> public String startCustomizationWorkflow() {
> {...}
> }
> }
>
>
> --
> SELECT * FROM users WHERE clue > 0
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Struts-2.1.6%2C-Convention-plugin%2C-and-Scope-interceptor-tp22871286p22889306.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org