[jboss-user] [JBoss Seam] - Re: Seam jBPM: use annotation or pages.xml to get next task?

gavin.king@jboss.com do-not-reply at jboss.com
Tue Mar 20 12:29:09 EDT 2007

Oh, perhaps I understand now.

What you want is to navigate from a list of *all kinds of tasks*, to the specific page for the task, without using multiple tasks lists. Is that all?

Well, thats completely trivial:

  | public class TaskSelector
  | {
  |     @In TaskInstance taskInstance;
  |     @StartTask
  |     public String select()
  |     {
  |         return taskInstance.getName();
  |     }
  | }

Call it from:

<h:dataTable value="#{taskInstanceList}" var="task">
  |     :    
  |     <h:column>
  |         <s:button action="#{taskSelector.select}" taskInstance="#{task}" value="Go"/>
  |     </h:column>               
  | </h:dataTable>

And write navigation rules like:

<rule if-outcome="fooTaskName">
  |     <redirect view-id="/foo.xhtml"/>
  | </rule>
  | <rule if-outcome="barTaskName">
  |     <redirect view-id="/bar.xhtml"/>
  | </rule>

That's it!

If you want me to make TaskSelector a built-in component I can do it, but it's kinda trivial....

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029872#4029872

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029872

More information about the jboss-user mailing list