This content has been marked as final.
Show 6 replies
-
1. Re: Page Scope and back-button
asookazian Jul 27, 2009 10:45 PM (in response to israel.bgf)Not sure if this is directly related to your question, but it may help shed some light on the topic:
If a page is set to redirect after a transition, it is not possible to use the back button
to return to that page even when back is enabled on a page later in the flow. The
reason is because Seam stores information about the pageflow in the page scope
and the back button must result in a POST for that information to be restored (i.e.,
a Faces request). A redirect severs this linkage.Show your pages.xml.
The <redirect/> element has the same effect as <redirect/>
in a JSF navigation rule: namely, a post-then-redirect behavior, to overcome problems with the
browser's refresh button. -
2. Re: Page Scope and back-button
israel.bgf Jul 28, 2009 1:35 PM (in response to israel.bgf)Thks arbi i think that's the way to solve my problem. I'm not using pageflow or navigation rules in the page.xml, it's only programatically (navigation string on action method). What should i put in my page.xml?
(Page A -> Page B) - Back Button on page B have to send the user back to Page A.
The redirect tag is a sub-tag right? What's the parent tag for it? -
3. Re: Page Scope and back-button
asookazian Jul 29, 2009 2:00 AM (in response to israel.bgf)Example:
<page view-id="/ManageEquipment.xhtml"> <description>Manage Equipment</description> <action execute="#{manageSiteId.init}"/> <navigation from-action="#{manageEquipment.processRepairHistorySelection}"> <redirect view-id="/RepairCaseDetails.xhtml"/> </navigation> <navigation from-action="#{manageEquipment.searchSerialNumber}"> <redirect view-id="/ManageEquipment.xhtml"/> </navigation> </page>
The advantage of having all your page navigation in one place (i.e. the pages.xml file) is that it's easier to read the overall page flow of your app.
-
4. Re: Page Scope and back-button
israel.bgf Jul 29, 2009 2:58 PM (in response to israel.bgf)I'm still getting problems Arbi. Look at my 2 page.xml from my views. The first one (Page A):
<navigation from-action="#{consultarComprovante.selecionar(subitem)}">
<redirect view-id="/pages/usuario/consultarParcelaVenda.xhtml"/>
</navigation>
Ok no problem, when i invoke that action i go to the other page. And that page (Page B) have this page.xml
<navigation >
<rule if="#{consultarParcela.comprovante == null}">
<redirect view-id="/pages/usuario/consultarComprovante.xhtml">
<message severity="WARN">Selecione um comprovante primeiro.</message>
</redirect>
</rule>
</navigation>
Only a check to prevent the user to coming directly to this page first, ignore it. The problem is: now in the second page if use the browser back-button (Firefox), i'm back to a fresh page, not the old one. Remember i'm using page-scope with both backing-beans of the page.
I didnt understand where i have to put the redirect tag in this situation as you told me to do in your first post.
Thks again,
Israel -
5. Re: Page Scope and back-button
israel.bgf Jul 29, 2009 4:06 PM (in response to israel.bgf)After doing some research and testing... all these back button problem are cause by intensive use of a4j/rich components. It looks like that the page scope don't like them or something like it. I'm going to post my example in richfaces forum.
-