Hey Peter, thanks for the reply.

I changed my page flow to use : 


  |     <start-state name="teststart">
  |             <transition to="test1"/>
  |     </start-state>
  |     
  | 
  |     <page name="test1" view-id="/testpage1.xhtml">
  |             <transition name="next" to="test2" />
  |     </page>
  | 

and when I click my links I get  : 

pageflow is not currently at a <page> or <start-page> node 
  | (note that pageflows that begin during the RENDER_RESPONSE phase should use 
<start-page> instead of <start-state>)

Which I had already tried. 

So, I think most of my cases involve going to a new page when I start a flow, 
therefore, I need to use start-state, hence thereforth, I need to determine how 
to start a page flow that is compatable with the start-state syntax.

After a bit of messing around, browsing the examples (DVD Store checkout flow) 
it looks like I have it working.

(Steps included for the benefit of the next poor soul with this problem)

I added a function which returns void, and annotate it with the 
begin(pageflow). I also added one without the annotation so I could test the 
inline pageflow/conversation starters  : 


  |     @Begin(pageflow="TestFlow")
  |     public void annotatedVoidFunc() {
  |             log.info("Annotated Voidfunc Called");          
  |     }
  |     
  |     public void voidFunc() {
  |             log.info("Voidfunc Called");            
  |     }
  | 
  | 

In my page, I created new links  : 


  | <s:link value="Annotated Void Func" 
action="#{TestAction.annotatedVoidFunc}"/><br/>            
  | <s:link value="inline Void Func" action="#{TestAction.voidFunc}" 
propagation="begin" pageflow="TestFlow"/><br/>                                
  | 

I compiled, deployed, ran, and both links work fine.  

So, I guess if you want to jump to the first page of the pageflow and have 
navigation handled for you by the page flow, you need to use a void function 
that doesn't return a string. 

I have to confess, I am a little unclear on how action methods are handled when 
they return void vs returning null vs returning a string. From this example, it 
seems that it does make a difference.

Thanks again peter, 

DG





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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038076
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to