[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1358) conversation stack not popping properly when used with pages.xml
Hung Tang (JIRA)
jira-events at lists.jboss.org
Sun May 27 12:57:18 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1358?page=comments#action_12363284 ]
Hung Tang commented on JBSEAM-1358:
-----------------------------------
I suspect that the <begin-conversation nested="true"> is the culprit for this and it's being read again when invoking the s:link so that's why there's another new nested conversation started. When this happen, there's a duplicate entry at the top of the stack and the redirectToParent will appear that it it didn't redirect to anywhere.
Question is why is the page read again during an s:link?
I think it's because I didn't specify a "view" attribute so s:link may just re-render the same view. I just tried specifying a "fake" view for the s:link in page2.xhtml and the problem seems to be fixed, but this is a hack.
I had opened [http://jira.jboss.com/jira/browse/JBSEAM-1313] for including an additional option to s:link to "return-to-parent".
> conversation stack not popping properly when used with pages.xml
> ----------------------------------------------------------------
>
> Key: JBSEAM-1358
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1358
> Project: JBoss Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.3.0.ALPHA
> Reporter: Hung Tang
>
> Assume there are two pages p1 and p2. Entering p1 will start a conversation c1. p1 contains a s:link to p2, which when clicked will start a new nested conversation c2. In p2, there's a s:link that goes back to p1 by invoking action #{conversation.redirectToParent}.
> The strange part.
> If the propagation=nested rule is specified as part of the s:link, then the redirectToParent is working okay and the conversationStack is consistent.
> If the propagation=nested rule is specified as part of p2.page.xml as <begin-conversation nested="true"/>, then the redirectToParent does not redirect to parent, and the conversationStack reports an additional duplicate entry for p2.
> -- Code snippets
> ## page1.page.xml
> <page>
> <description>Page 1</description>
> <begin-conversation join="true"/>
> </page>
> ## page1.xhtml
> <html>
> <h:form>
> <ui:repeat var="entry" value="#{conversationStack}">
> <h:outputText value="|"/>
> <h:commandLink value="#{entry.description}" action="#{entry.select}"/>
> </ui:repeat>
> </h:form>
> <s:link view="/page2.xhtml" value="Page 2"/>
> </html>
> ## page2.page.xml
> <page>
> <description>Page 2</description>
> <begin-conversation nested="true"/>
> </page>
> ## page2.xhtml
> <html>
> <h:form>
> <ui:repeat var="entry" value="#{conversationStack}">
> <h:outputText value="|"/>
> <h:commandLink value="#{entry.description}" action="#{entry.select}"/>
> </ui:repeat>
> </h:form>
> <s:link value="Back to parent" action="#{conversation.redirectToParent}"/>
> </html>
--
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
More information about the seam-issues
mailing list