FYI - using Seam 1.2.1 GA, with a seam-gen built app.

I was having some issues with pageflows while I was writing a dummy app, and 
ended up running into so many brick walls with pageflows that I decided to 
write a PageFlow test application so I could determine how they really work. I 
have a page that starts page flows using method calls annotated with @Begin, or 
using the inline pageflow/conversation starter in s:link. They all work which 
is really nice. However, I did notice a couple of things : 

1) Using the begin-conversation in pages.xml means that you have to use 
join=true since anytime that page is refreshed, it tries to start a new 
conversation, which, when called from a long running conversation (as it is in 
this case since the page flow is a long running conversation) results in an 
error. To get around this, I set join = true and it works. 

This was documented in a Jira issue 

http://jira.jboss.org/jira/browse/JBSEAM-608, and was marked as fixed in Seam 
1.1. Although maybe it was referring to the pageflow restarting each time, and 
not the conversation.

I just wondered whether this was 'as intended' or whether there is an issue 
(join="true" is, I think , an acceptable solution)

Also, 

2) The conversation switcher is never displaying conversations for a pageflow. 
When I start a pageflow with the conversation the description on the 
conversationEntry object is null. If I start a conversation and no pageflow, 
then the descriptions appear in the switcher just fine, so I know that the page 
description is correct and in the right place. I have a conversation logger 
bean that listens for conversation start/end events, and on the event, lists 
the conversationEntry descriptions which are all null when a pageflow is used  
(and set when no pageflow is used)
I guess the problem is with description not being populated when needed.

All the conversation, and pageflow elements are working fine. The switcher code 
is copied and pasted from the pdf seam reference guide with just to two example 
fixed items removed.

I did search for any existing JIRA issues related to this problem, but didn't 
find any. I can fill out a JIRA for the issues unless someone can find an error 
in my thinking?

I have stumbled across both of these issues outside of my example application, 
and they are very reproduceable.

Here's the code basics :


  |     <page view-id="/countpage.xhtml">
  |             <begin-conversation join="true" pageflow="counter_page" />
  |             <description>
  |                     Count page with value #{counter.value}
  |             </description>
  |     </page>
  | 


S:Link to start the conversation and pageflow (starts conversation and 
pageflow, but no switcher)


  |   <s:link value="Start Flow From S link"
  |       view="/countpage.xhtml" propagation="begin" pageflow="counter_state"> 
 
  |   </s:link>
  | 
  | 

S: link to start conversation only, which causes the conversation to appear in 
the switcher.


  |   <s:link value="Start Conversation Only From S link"
  |       view="/countpage.xhtml" propagation="begin">  
  |   </s:link>
  | 
  | 

For the pageflow, I have two almost identical ones, one for start-page and the 
other for start-state (as I said, it is a dummy app for testing page flows)



  |     <start-state name="start">
  |             <transition to="counterpage"/>
  |     </start-state>
  | 
  |     <page name="counterpage" view-id="/countpage.xhtml">
  |             <transition name="increase" to="counterpage" />
  | 
  |             <transition name="increaseExec" to="counterpage">
  |                     <action expression="#{counter.increase}" />
  |             </transition>
  | 
  |             <transition name="decrease" to="counterpage" />
  | 
  |             <transition name="decreaseExec" to="counterpage">
  |                     <action expression="#{counter.decrease}" />
  |             </transition>
  | 
  |             <transition name="done" to="complete" />
  |     </page>
  | 
  |     <page name="complete" view-id="/home.xhtml">
  |             <end-conversation />
  |     </page>
  | 

The other one uses the counterpage as the start-page, and is identical.


Switcher code (taken from the pdf seam reference guide), this resides in my 
template.xml file in the footer.


  | <div class="footer"><h:form>
  |     <h:selectOneMenu value="#{switcher.conversationIdOrOutcome}">
  |             <f:selectItems value="#{switcher.selectItems}" />
  |     </h:selectOneMenu>
  |     <h:commandButton action="#{switcher.select}" value="Switch" />
  | </h:form></div>
  | 
  | 


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

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

Reply via email to