[jboss-user] [JBoss Seam] - Re: Request4Advice: Defining ProcessInstance Var's in Pagefl

2007-02-27 Thread [EMAIL PROTECTED]
"processInstance" is the ProcessInstance associated with the current business 
process, not the one for the pageflow.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023098
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Request4Advice: Defining ProcessInstance Var's in Pagefl

2007-02-27 Thread mgombocz
To whom it may concern.

So, here's a solution (a few hours of sleep helped...):

First of all here's my pageflow where I initialize and update two process 
variables named "totalPages" and "currentPage":

  | 
  | 
  | 
  | int total = 2;
  | int current = 1;
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | current++;
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | current--;
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

These two variables can then be accessed in the views via:
#{pageflow.processInstance.contextInstance.variables['currentPage']}
  | #{pageflow.processInstance.contextInstance.variables['totalPages']}

For whatever reason using context variable "processInstance" directly does not 
work, like
#{processInstance.contextInstance.variables['currentPage']}
  | 

Cheers.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023039
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user