[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1901) ConversationEntry.isDisplayable should also check that its not isRemoveAfterRedirect

Chris Rudd (JIRA) jira-events at lists.jboss.org
Mon Sep 24 18:25:40 EDT 2007

    [ http://jira.jboss.com/jira/browse/JBSEAM-1901?page=comments#action_12378469 ] 
Chris Rudd commented on JBSEAM-1901:

Ive worked around the conversations showing up when there not suppose to via the following overriden ConversationList component :

@Install(precedence = FRAMEWORK)
public class ConversationList extends org.jboss.seam.core.ConversationList {
	protected List<ConversationEntry> createConversationEntryList() {
		List<ConversationEntry> list = super.createConversationEntryList();

		for (Iterator<ConversationEntry> it = list.iterator(); it.hasNext();) {
			ConversationEntry entry = it.next();
			if (entry.isRemoveAfterRedirect())
			// If the entry is for the current conversation, but the current
			// conversation is NOT long running
			// we dont want it.
			// Note : we cannot use entry.isCurrent() as it only works for long running conversations
			else if (isCurrent(entry)
					&& !Manager.instance().isLongRunningConversation())

		return list;

	private boolean isCurrent(ConversationEntry entry) {
		if( entry == Manager.instance().getCurrentConversationEntry() )
			return true;
		return entry.getId().equals( Manager.instance().getCurrentConversationId() );

> ConversationEntry.isDisplayable should also check that its not isRemoveAfterRedirect
> ------------------------------------------------------------------------------------
>                 Key: JBSEAM-1901
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1901
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0.BETA1
>            Reporter: Chris Rudd
>         Assigned To: Pete Muir
>            Priority: Minor
>             Fix For: 2.0.1.GA
> I have a situation where temporary conversations that are promoted to long running (due to a redirect) for views with a valid description show up in the conversationList.
> If ConversationEntry.isDisplayable adds the contraint !isRemoveAfterRedirect() , then the issue does not appear.
> public boolean isDisplayable() 
> {
>    return !isEnded() && !isRemoveAfterRedirect() && getDescription()!=null;
> }
> NOTE: The particular instance this occurs in for me is due to a current limitation in seam. Currently there is no way to end the current conversation and start a new one (under a new conversation context) in the same request. For instance :
> Im in conversation id 5, I hit the "done" button, which I want to end the current conversation (and destroy that context), then redirect me toto the same view starting a new conversation.
> There use to be a "new" propagation mode, but that seems to be missing now. If you simply start a new conversation after the redirect, the current conversation (the one promoted due to the redirect, the same one you wanted to end) is just propagated along and contains all same state as before. This is not the desired affect, I want a NEW conversation that contains only new items
> So my "workaround" is to have the "done" out come end the conversation, redirect me to another action, that then redirects me to my final view with a propagation none.  The "problem" is that the first conversation, is still out there waiting to be "continued" so that it can convert it back into a temporary (as its marked removeAfterRedirect). Since is a long running conv, it shows up in the conv list (which it should not as its not really a long running conversation). The conv is eventually pruned (due to conv timeout).
> <rule if-outcome="done">
>    <end-conversation/>
>    <redirect> <!-- redirect to same page and fire the edit action -->
>              <param name="actionOutcome" value="#{'edit'}"/>
>              <param name="conversationPropagation" value="none"/>
>    </redirect>
> </rule>
> <rule if-outcome="edit">
>    <begin-conversation join="true"/>
> </rule>

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