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",
interceptorre...@interceptorref(value="scope", params={"type", "start"})
)
public String startCustomizationWorkflow() {
{...}
}
@Action(value="endCustomizationWorkflow",
interceptorre...@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: [email protected]
For additional commands, e-mail: [email protected]