-
1. Re: Redirect the user to a page when entering a node
coolex Jul 14, 2008 5:48 AM (in response to coolex)I've created an action in a node and the action class looks like this:
@Redirect(viewId="/home.xhtml") public class Test implements ActionHandler{ private static final long serialVersionUID = 1L; public void execute(ExecutionContext arg0) throws Exception { System.out.println("HelloWorld!"); } }
I expected this will redirect the user to home.xhtml but nothing happens except "HelloWorld!" is printed out on the console. -
2. Re: Redirect the user to a page when entering a node
jbarrez Jul 14, 2008 7:58 AM (in response to coolex)This depends on 2 things:
1) Which is the GUI technology
2) How is jbpm used: workflow/pageflow/...
? -
3. Re: Redirect the user to a page when entering a node
coolex Jul 14, 2008 10:32 AM (in response to coolex)1.) JSF, RichFaces (SEAM)
2.) Workflow (normal long-running business process) -
4. Re: Redirect the user to a page when entering a node
kukeltje Jul 14, 2008 4:52 PM (in response to coolex)1: look at other Seam examples. The redirect is not used on actionhandlers but on methods of your beans
-
5. Re: Redirect the user to a page when entering a node
coolex Jul 15, 2008 4:26 AM (in response to coolex)Thanks for reply.
I know the examples very well but the way they do it is a static. That means: each time I change my process I have to change other files (Java classes or xml files). My intention is to make it somehow dynamic. So if I change a direction to another node I shouldn't change any navigation rules or so. -
6. Re: Redirect the user to a page when entering a node
kukeltje Jul 15, 2008 2:19 PM (in response to coolex)Dynamic in what way? You have to declare something somewhere. Sure, you could make some custom code that takes e.g. the combination of task-node-name and task-name to show a certain page. That would be related then to this combination, whereever in your process it is. That should executed on one of the jsf phases, just like seam intercepts those.