myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarinsc...@apache.org
Subject svn commit: r511611 - in /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss: PartialTreeStructureManager.java PssJspStateManagerImpl.java UIViewRootWrapper.java
Date Sun, 25 Feb 2007 21:09:07 GMT
Author: mmarinschek
Date: Sun Feb 25 13:09:06 2007
New Revision: 511611

URL: http://svn.apache.org/viewvc?view=rev&rev=511611
Log:
partial state saving fixes (MYFACES-1541)

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PartialTreeStructureManager.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PssJspStateManagerImpl.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/UIViewRootWrapper.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PartialTreeStructureManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PartialTreeStructureManager.java?view=diff&rev=511611&r1=511610&r2=511611
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PartialTreeStructureManager.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PartialTreeStructureManager.java
Sun Feb 25 13:09:06 2007
@@ -30,8 +30,6 @@
 {
     public static final String PARTIAL_STATE_CLASS_IDS = PartialTreeStructureManager.class.getName()
+ ".PARTIAL_STATE_MANAGER_COMPONENT_IDS";
 
-    private FacesContext _facesContext;
-
     public PartialTreeStructureManager(FacesContext facesContext)
     {
         _facesContext = facesContext;
@@ -50,21 +48,10 @@
     private TreeStructComponent internalBuildInitalTreeStructureToSave(UIComponent component,FacesContext
facesContext, Object state, int childIndex)
     {
 
-        Object myState = null;
-        Map facetStateMap = null;
-        List childrenStateList = null;
-
+        Object myState = ((Object[])state)[0];
+        Map facetStateMap = (Map)((Object[])state)[1];
+        List childrenStateList = (List)((Object[])state)[2];
 
-        if (state != null)
-        {
-            myState = ((Object[])state)[0];
-            facetStateMap = (Map)((Object[])state)[1];
-            childrenStateList = (List)((Object[])state)[2];
-        }
-        else
-        {
-
-        }
         TreeStructComponent structComp = new TreeStructComponent(convertStringToComponentClassId(facesContext,component.getClass().getName()),
                                                                       component.getId(),myState,component.isTransient());
 
@@ -131,21 +118,10 @@
     private TreeStructComponent internalBuildTreeStructureToSave(UIComponent component,FacesContext
facesContext, Object state, int childIndex)
     {
 
-        Object myState = null;
-        Map facetStateMap = null;
-        List childrenStateList = null;
+        Object myState = ((Object[])state)[0];
+        Map facetStateMap = (Map)((Object[])state)[1];
+        List childrenStateList = (List)((Object[])state)[2];
 
-
-        if (state != null)
-        {
-            myState = ((Object[])state)[0];
-            facetStateMap = (Map)((Object[])state)[1];
-            childrenStateList = (List)((Object[])state)[2];
-        }
-        else
-        {
-
-        }
         TreeStructComponent structComp = new TreeStructComponent(convertStringToComponentClassId(facesContext,component.getClass().getName()),
                                                                       component.getId(),myState,component.isTransient());
 

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PssJspStateManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PssJspStateManagerImpl.java?view=diff&rev=511611&r1=511610&r2=511611
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PssJspStateManagerImpl.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/PssJspStateManagerImpl.java
Sun Feb 25 13:09:06 2007
@@ -67,12 +67,6 @@
 
     private static final String PARTIAL_STATE_MANAGER_TREES = PssJspStateManagerImpl.class.getName()
+ ".PARTIAL_STATE_MANAGER_TREES";
 
-
-
-    /**
-     * Only applicable if state saving method is "server" (= default).
-     * Defines the amount (default = 20) of the latest views are stored in session.
-     */
     /**
      * Only applicable if state saving method is "server" (= default).
      * Defines the amount (default = 20) of the latest views are stored in session.
@@ -82,9 +76,6 @@
     /**
      * Default value for <code>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</code>
context parameter.
      */
-    /**
-     * Default value for <code>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</code>
context parameter.
-     */
     private static final int DEFAULT_NUMBER_OF_VIEWS_IN_SESSION = 20;
 
     /**
@@ -941,7 +932,6 @@
                     objectEntry[0] = entry.getKey();
                     objectEntry[1] = diffComponent((TreeStructComponent)entry.getValue()
,foundtemplateComponent);
                     facets.add(objectEntry);
-                    //facets[facetindex++] = objectEntry;
                 }
             }
             diffComponent.setFacets(facets.toArray());

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/UIViewRootWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/UIViewRootWrapper.java?view=diff&rev=511611&r1=511610&r2=511611
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/UIViewRootWrapper.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/pss/UIViewRootWrapper.java
Sun Feb 25 13:09:06 2007
@@ -7,12 +7,24 @@
 import java.util.*;
 import java.io.IOException;
 
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
- * Created by IntelliJ IDEA.
- * User: retro
- * Date: Feb 23, 2007
- * Time: 1:12:32 PM
- * To change this template use File | Settings | File Templates.
+ * @author Martin Haimberger
  */
 public class UIViewRootWrapper extends UIViewRoot
 {
@@ -92,7 +104,6 @@
 
     public static final String COMPONENT_TYPE = "javax.faces.ViewRoot";
     public static final String COMPONENT_FAMILY = "javax.faces.ViewRoot";
-    //private static final String DEFAULT_RENDERKITID = RenderKitFactory.HTML_BASIC_RENDER_KIT;
 
     public String getFamily()
     {



Mime
View raw message