[jboss-cvs] jboss-seam/src/main/org/jboss/seam/jsf ...

Gavin King gavin.king at jboss.com
Tue Oct 31 17:29:41 EST 2006


  User: gavin   
  Date: 06/10/31 17:29:41

  Modified:    src/main/org/jboss/seam/jsf  AbstractSeamPhaseListener.java
  Log:
  fix a bug where conversation lists did not get updated
  share the same lock b/w all nested conversations of the same root conversation
  improve display of conversation list
  
  Revision  Changes    Path
  1.19      +14 -0     jboss-seam/src/main/org/jboss/seam/jsf/AbstractSeamPhaseListener.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AbstractSeamPhaseListener.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/jsf/AbstractSeamPhaseListener.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -b -r1.18 -r1.19
  --- AbstractSeamPhaseListener.java	22 Oct 2006 01:47:12 -0000	1.18
  +++ AbstractSeamPhaseListener.java	31 Oct 2006 22:29:41 -0000	1.19
  @@ -13,14 +13,19 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.jboss.seam.Seam;
  +import org.jboss.seam.contexts.Context;
   import org.jboss.seam.contexts.ContextAdaptor;
   import org.jboss.seam.contexts.Contexts;
   import org.jboss.seam.contexts.Lifecycle;
  +import org.jboss.seam.core.ConversationList;
  +import org.jboss.seam.core.ConversationStack;
   import org.jboss.seam.core.FacesMessages;
   import org.jboss.seam.core.Init;
   import org.jboss.seam.core.Manager;
   import org.jboss.seam.core.Pageflow;
   import org.jboss.seam.core.Pages;
  +import org.jboss.seam.core.Switcher;
   import org.jboss.seam.util.Transactions;
   
   public abstract class AbstractSeamPhaseListener implements PhaseListener
  @@ -137,6 +142,14 @@
         }
         
         Lifecycle.flushPage();
  +      if ( Contexts.isPageContextActive() )
  +      {
  +         //force refresh of the conversation lists (they are kept in PAGE context)
  +         Context pageContext = Contexts.getPageContext();
  +         pageContext.remove( Seam.getComponentName(ConversationList.class) );
  +         pageContext.remove( Seam.getComponentName(Switcher.class) );
  +         pageContext.remove( Seam.getComponentName(ConversationStack.class) );
  +      }
   
         selectDataModelRow( facesContext.getExternalContext().getRequestParameterMap() );
         
  @@ -160,6 +173,7 @@
            FacesMessages.instance().beforeRenderResponse();
            Manager.instance().prepareBackswitch(event);
         }
  +      
      }
      
      private boolean callPageActions(PhaseEvent event)
  
  
  



More information about the jboss-cvs-commits mailing list