[
http://jira.jboss.com/jira/browse/JBSEAM-1574?page=all ]
Michael Youngstrom reopened JBSEAM-1574:
----------------------------------------
Ok, so I looked and I was unable to find the issue that broke this functionality so I went
ahead and created a patch that fixes the problem for me.
All I'm doing in this patch is executing page actions after the s:link s:button
action/navigation which I think is the more correct way to handle this anyway since that
is the same order h:commandLink/Button would work call the actions in. I threw in
something to not call the actions if getResponseComplete since that is also how things
would react if h:commandLink/Button were called.
Go ahead and re-close if this solution still has the problem you mentioned about but I
would like a little more information if you have it.
Index: src/main/org/jboss/seam/navigation/Pages.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/navigation/Pages.java,v
retrieving revision 1.6
diff -u -r1.6 Pages.java
--- src/main/org/jboss/seam/navigation/Pages.java 26 Jun 2007 16:54:13 -0000 1.6
+++ src/main/org/jboss/seam/navigation/Pages.java 5 Jul 2007 23:00:46 -0000
@@ -283,19 +283,22 @@
return false;
}
}
-
- //run the page actions, check permissions,
- //handle conversation begin/end
- boolean result = false;
- for ( Page page: pageStack )
- {
- result = page.preRender(facesContext) || result;
- }
-
+
//run the s:link / s:button action after checking the
//conversation existence!
- result = callAction(facesContext) || result;
+ boolean result = callAction(facesContext);
+ //run the page actions, check permissions,
+ //handle conversation begin/end
+ //If responseComplete then we're probably doing a redirect so don't call
the page actions now.
+ if(!facesContext.getResponseComplete()) {
+ String newViewId = getViewId(facesContext);
+ for ( Page page: getPageStack(newViewId) )
+ {
+ result = page.preRender(facesContext) || result;
+ }
+ }
+
return result;
}
view-id actions are not called when rendering from a previous
view-id
---------------------------------------------------------------------
Key: JBSEAM-1574
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1574
Project: JBoss Seam
Issue Type: Bug
Components: JSF
Affects Versions: 2.0.0.BETA1
Reporter: Michael Youngstrom
Fix For: 2.0.0.CR1
<page view-id="/list.xhtml">
<navigation>
<rule if-outcome="detail">
<render view-id="/detail.xhtml"/>
</rule>
</navigation>
</page>
<page view-id="/detail.xhtml"
action="#{bean.loadDetail}"/>
Does not appear to call #{bean.loadDetail} when the list navigation rule is executed.
Mike
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira