You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2009/06/22 22:06:37 UTC

svn commit: r787374 - in /myfaces/trinidad/branches/1.2.11.4-branch: ./ trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/ trinidad-sandb...

Author: arobinson74
Date: Mon Jun 22 20:06:36 2009
New Revision: 787374

URL: http://svn.apache.org/viewvc?rev=787374&view=rev
Log:
TRINIDAD-1514

Change the code so that client IDs get reset for all UIXCollection children, not just EditableValueHolder, UIXCollection and UIXShowDetail components

Modified:
    myfaces/trinidad/branches/1.2.11.4-branch/   (props changed)
    myfaces/trinidad/branches/1.2.11.4-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java
    myfaces/trinidad/branches/1.2.11.4-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/   (props changed)
    myfaces/trinidad/branches/1.2.11.4-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/   (props changed)

Propchange: myfaces/trinidad/branches/1.2.11.4-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun 22 20:06:36 2009
@@ -1,4 +1,4 @@
 /myfaces/trinidad/branches/1.2.9.1-branch:697924,699406,699496
 /myfaces/trinidad/branches/TRINIDAD-1402:745675
 /myfaces/trinidad/branches/jwaldman_StyleMap:754977-770778
-/myfaces/trinidad/trunk:745151,755794,758112,758415-758416,765711,765745,766910,767634
+/myfaces/trinidad/trunk:745151,755794,758112,758415-758416,765711,765745,766910,767634,787368

Modified: myfaces/trinidad/branches/1.2.11.4-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.11.4-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java?rev=787374&r1=787373&r2=787374&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.11.4-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java (original)
+++ myfaces/trinidad/branches/1.2.11.4-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java Mon Jun 22 20:06:36 2009
@@ -6,9 +6,9 @@
  *  to you 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
@@ -23,11 +23,13 @@
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.io.Serializable;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+
 import javax.faces.component.EditableValueHolder;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -35,6 +37,7 @@
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
+
 /**
  * This class saves the state of stamp components.
  */
@@ -78,7 +81,7 @@
     }
 
     DualKey dk = new DualKey(currencyObj, key);
-    // Make sure that if we're applying a null value, that we 
+    // Make sure that if we're applying a null value, that we
     // don't hold on to the key and retain the entry - just nuke
     // the entry
     if (value == null)
@@ -113,14 +116,14 @@
   public static void restoreStampState(FacesContext context, UIComponent stamp,
                                        Object stampState)
   {
+    String stampId = stamp.getId();
+    // Force the ID to be reset to reset the client identifier (needed
+    // for UIComponentBase implementation which caches clientId too
+    // aggressively)
+    stamp.setId(stampId);
+
     if (stampState != null)
     {
-      String stampId = stamp.getId();
-      // Force the ID to be reset to reset the client identifier (needed
-      // for UIComponentBase implementation which caches clientId too
-      // aggressively)
-      stamp.setId(stampId);
-
       RowState state = (RowState) stampState;
       state.restoreRowState(stamp);
     }
@@ -153,32 +156,32 @@
       // Until we have one non-null entry, don't allocate the array.
       // Unlike facets, we *do* care about stashing Transient.TRUE,
       // because we have to keep track of them relative to any
-      // later components, BUT if it's all null and transient, we 
-      // can discard the array.  This does mean that putting 
+      // later components, BUT if it's all null and transient, we
+      // can discard the array.  This does mean that putting
       // transient components into a stamp is a bit inefficient
-      
+
       // So: allocate the array if we encounter our first
       // non-null childState (even if it's transient)
       if (childStateArray == null)
       {
         if (childState == null)
           continue;
-        
+
         childStateArray = new Object[childCount];
       }
-      
+
       // But remember the moment we've encountered a non-null
       // *and* non-transient component, because that means we'll
       // really need to keep this array
       if ((childState != UIXCollection.Transient.TRUE) && (childState != null))
         childStateIsEmpty = false;
-      
+
       // Store a value into the array
       assert(childStateArray != null);
       childStateArray[i] = childState;
     }
 
-    // Even if we bothered to allocate an array, if all we 
+    // Even if we bothered to allocate an array, if all we
     // had were transient + null, don't bother with the array at all
     if (childStateIsEmpty)
       return null;
@@ -388,7 +391,7 @@
     static private final SDState _NULL = new SDState(null);
 
     /**
-     * 
+     *
      */
     private static final long serialVersionUID = -8605916495935317932L;
 

Propchange: myfaces/trinidad/branches/1.2.11.4-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun 22 20:06:36 2009
@@ -1,3 +1,3 @@
 /myfaces/trinidad/branches/1.2.9.1-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:699406,699496
 /myfaces/trinidad/branches/TRINIDAD-1402/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745675
-/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745151,755794,758112,758415-758416
+/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:745151,755794,758112,758415-758416,787368

Propchange: myfaces/trinidad/branches/1.2.11.4-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun 22 20:06:36 2009
@@ -1,3 +1,3 @@
 /myfaces/trinidad/branches/1.2.9.1-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:699406,699496
 /myfaces/trinidad/branches/TRINIDAD-1402/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745675
-/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745151,755794,758112,758415-758416
+/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:745151,755794,758112,758415-758416,787368