[
http://jira.jboss.com/jira/browse/JBSEAM-1162?page=all ]
Daniel Wiell reopened JBSEAM-1162:
----------------------------------
I just checked out the latest version from CVS, and I still have the same problem.
Here comes a (very) detailed instruction on how to reproduce it:
1) Install a fresh Tomcat 5.5.23
2) Check out latest CVS version
(cvs -d:pserver:anonymous@anoncvs.forge.jboss.com:/cvsroot/jboss co jboss-seam)
3) Add test1.xhtml and test2.xhtml to examples/hibernate/view
4) Add the pages.xml snippet to examples/hibernate/resources/WEB-INF/pages.xml
5) Run "ant clean dist"on the project
6) Change dir to the newly built distribution.
7) Point tomcat.home in build.properties to your tomcat installation.
8) Change dir to examples/hibernate
9) Run "ant deploy.tomcat"
10) Start tomcat
11) Point the browser to
http://localhost:8080/jboss-seam-hibernate/test1.jsf
12) Click "To test 2 (s:link)"
13) Click "To test 1"
BANG! java.lang.IllegalStateException: begin() called from long-running conversation, try
join=true
The conversation propagated! Not what I expected.
14) Point the browser back to
http://localhost:8080/jboss-seam-hibernate/test1.jsf
15) Click "To test 2 (h:commandLink no propagate)"
16) Click "To test 1"
Everything is alright, the conversation obviously didn't propagate.
14) Point the browser back to
http://localhost:8080/jboss-seam-hibernate/test1.jsf
15) Click "To test 2 (h:commandLink propagates)"
16) Click "To test 1"
BANG! java.lang.IllegalStateException: begin() called from long-running conversation, try
join=true
The conversation propagated, as it should.
propagation none with s:link
----------------------------
Key: JBSEAM-1162
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1162
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.2.1.GA
Environment: Seam 1.2.1.GA, MyFaces 1.1.6 nighly from march, Facelets 1.1.11
Reporter: Daniel Wiell
Assigned To: Gavin King
<s:link action="/test.xhtml" propagate="none"/>
behaves diffrently from
<h:commandLink action="/test.xhtml">
<f:param name="conversationPropagation" value="none"/>
</h:commandLink>
The s:link propagates the conversation to the next view, while the h:commandLink
doesn't.
Here are some code to replicate this behavior:
----------------------- test1.xhtml
<?xml version='1.0' encoding='UTF-8'?>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib">
<head></head>
<body>
<h:form>
<h:commandLink value="Refresh" action="/test1.xhtml"/>
<br/><br/>
<!-- Doesn't work expected - Propagates the conversation. -->
<s:link value="To test 2 (s:link)" action="/test2.xhtml"
propagation="none"/>
<br/>
<!-- Works as expected - does not propagate the conversation -->
<h:commandLink value="To test 2 (h:commandLink no propagate)"
action="/test2.xhtml">
<f:param name="conversationPropagation" value="none"/>
</h:commandLink>
<br/>
<!-- Works as expected - propagates the conversation -->
<h:commandLink value="To test 2 (h:commandLink propagates)"
action="/test2.xhtml"/>
</h:form>
</body>
</html>
----------------------- test2.xhtml
<?xml version='1.0' encoding='UTF-8'?>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib">
<head></head>
<body>
<h:form>
<s:link value="To test 1" action="toTest1"/>
</h:form>
</body>
</html>
----------------------- The relevant parts from pages.xml
<page view-id="/test1.xhtml" >
<begin-conversation join="true"/>
</page>
<page view-id="/test2.xhtml">
<navigation>
<rule if-outcome="toTest1">
<begin-conversation/>
<redirect view-id="/test1.xhtml"/>
</rule>
</navigation>
</page>
--
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