[
https://jira.jboss.org/browse/WELD-549?page=com.atlassian.jira.plugin.sys...
]
David Beaumont commented on WELD-549:
-------------------------------------
I think changing the behaviour according to whether there is a long-running conversation
would be confusing. Imagine a navigation bar with h:links to different parts of your site
that is stored in a template or otherwise included into the current view. On views where
there is not a long-running conversation these links would not include the cid; On views
where there is, the cid parameter would be automatically added, possibly changing how the
target page of the h:link functions.
Suppose a site has a search list page and an entity home page. The entity home page has a
long-running conversation so users can save changes. This means that an h:link back to the
list page propagates the conversation. The user then clicks on a second entity, but is
very confused to see the first entity they just looked at again, because the conversation
has propagated right round a loop of views. Since I am waiting for a working JBAS6 to test
on, my understanding of how you would write a CDI crud application is probably lacking.
Changing the behaviour with Seam would be a bit strange too - adding Seam to your CDI
application could make it function differently, perhaps wrongly, without having changed a
single line of code.
Conversation propagated by default with h:link
----------------------------------------------
Key: WELD-549
URL:
https://jira.jboss.org/browse/WELD-549
Project: Weld
Issue Type: Bug
Components: Web Tier integration (JSF, JSP, EL and Servlet)
Affects Versions: 1.0.1.Final
Environment: GlassFish Server Open Source Edition 3.0.1 on Mac OS 10.6 and
Windows 7. WELD-000900 1.0.1 (SP2)
Reporter: David Beaumont
Assignee: Nicklas Karlsson
Fix For: 1.0.2.CR1
Attachments: CdiConvoBug.war
I created a long running conversation by running a method on a conversation scoped bean:
private boolean initialized;
public void init() {
if(initialized) return;
conversation.begin();
initialized = true;
}
From a facelets page using the JSF2 event system:
<f:metadata>
<f:event type="preRenderView" listener="#{convoBean.init}" />
</f:metadata>
If a conversation has been made long-running, the h:link tag will produce links with the
conversation query parameter, thereby propagating the conversation whether that was what
you wanted or not.
I.e:
<p>Link: <h:link outcome="page2.xhtml" value="a link"
/></p>
produces
<p>Link: <a href="/CdiConvoBug/page2.jsf?cid=3">a
link</a></p>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira