myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mstar...@apache.org
Subject svn commit: r1438122 - /myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java
Date Thu, 24 Jan 2013 18:38:05 GMT
Author: mstarets
Date: Thu Jan 24 18:38:05 2013
New Revision: 1438122

URL: http://svn.apache.org/viewvc?rev=1438122&view=rev
Log:
TRINIDAD-2347 - JSESSIONID is not send with the first response

Modified:
    myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java?rev=1438122&r1=1438121&r2=1438122&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java
(original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java
Thu Jan 24 18:38:05 2013
@@ -319,13 +319,24 @@ public class ViewDeclarationLanguageFact
     public void buildView(FacesContext facesContext, UIViewRoot uiViewRoot)
       throws IOException
     {
-      getWrapped().buildView(facesContext, uiViewRoot);
+      super.buildView(facesContext, uiViewRoot);
       if(PhaseId.RENDER_RESPONSE.equals(FacesContext.getCurrentInstance().getCurrentPhaseId()))
       {          
         ChangeManager cm = RequestContext.getCurrentInstance().getChangeManager();
         cm.applyComponentChangesForCurrentView(FacesContext.getCurrentInstance());
       }
     }
+    
+    @Override
+    public void renderView(FacesContext context, UIViewRoot view) throws IOException
+    {
+      // TRINIDAD-2347 - make sure that the session is 'touched' before rendering a page
with Facelets
+      if (!context.isPostback() && FACELETS_VIEW_DECLARATION_LANGUAGE_ID.equals(getId()))
+      {
+        context.getExternalContext().getSession(true);
+      }
+      super.renderView(context, view);
+    }
 
     private final ViewDeclarationLanguage _wrapped;
   }



Mime
View raw message