I have a pageflows in seam 2.2.0 GA (seam-gen EAR application in JBossAS5.1.GA), and I was obligated to add "back" transition and commandButton for that in my pageflows in order to make my users enabled with back navigation.
so I guess there is some configuration issue in your application.
Thanks for reply, Ilya. We have in fact very simple and short process definition, so I will let myself to paste it:
<pageflow-definition xmlns="http://jboss.com/products/seam/pageflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.2.xsd" name="Shopping Wizard"> <start-page name="enteringOrder" view-id="/firstStep.xhtml" redirect="true" back="disabled"> <transition name="next" to="selectingArticles"/> </start-page> <page name="selectingArticles" view-id="/secondStep.xhtml" redirect="true" back="disabled"> <transition name="next" to="viewingSummary"/> </page> <page name="viewingSummary" view-id="/thirdStep.xhtml" redirect="true" back="disabled"> <transition name="next" to="end"/> </page> <page name="end" view-id="/seller/reportPage.xhtml" redirect="true"> <end-conversation/> </page> </pageflow-definition>
and the pageflow starts here in pages.xml:
<page view-id="/firstStep.xhtml"> <begin-conversation join="true" pageflow="Shopping Wizard"/> </page>
And declaring jbpm in components.xml:
Can there be anything wrong in this configuration? Thanks in advance.
Could someone take a quick look on the very simple configuration above, please? Is there something wrong with it? It's important for us to have this freature working.
We are using Tomcat 6, Seam 2.2.0 and have war application. (We have tried numberguess demo from examples on JBoss 4.2 and the
backbutton is still enabled there).
There's nothing wrong in your configuration, I tried it and works (except I added the pageflow xml file in the <pageflow-definitions/> tag inside <bpm:jbpm/>).
Probably, you're missunderstanding the way this feature works: if the browser is on step three of the pageflow, and you click the back button and go to step 1 or 2, you will see no errors, those pages will be rendered correctly (maybe even from browser cache).
What the feature does is prohibit you from submitting anything from those pages you loaded via the back button. If you are on step 3 and use the back button to return to step 1, and click the next button, you'll be repositioned on step 3 and receive an
I tested this with Seam 2.2.0 and your sample pageflow and the behaviour described works correctly, so it is strange that it doesn't work for you... what submit action are you performing on those pages? To move to the next step in the pageflow, I use (the action parameter is the name of the transition to take to the next node):
<h:commandButton action="next" value="Go to next step" />
Thanks A LOT for your time and attention, Emir.
You are right, I didn't understand this concept correctly. I was stupid enough to think that just after pressing
backbutton by user, Seam magically handles it by redirecting him back to current view. And in that way user cannot reach previous pages by using
backbutton. The term
disablewas probably the thing that misleaded me.
After your explanations I understand this feature perfectly. And it works for me just as you said it should. Thanks again!
Piotr, I agree that
disabling the back buttonis a misleading statement.
I think it is possible to obtain the behavior you indicate (issuing the
Thanks again, Emir. It makes sense to me. We'll consider such solution. However it can be quite troublesome to submit page after each page load, event that is not caused by pressing back button (for example can bo source of ugly
field cannot be emptyvalidation messages).