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 2011/04/26 20:00:13 UTC

svn commit: r1096828 - in /myfaces/trinidad/branches/trinidad-1.2.x: ./ trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/

Author: arobinson74
Date: Tue Apr 26 18:00:12 2011
New Revision: 1096828

URL: http://svn.apache.org/viewvc?rev=1096828&view=rev
Log:
TRINIDAD-2047 - optimize the code I just added so that there is not an additional getProperty call

Modified:
    myfaces/trinidad/branches/trinidad-1.2.x/   (props changed)
    myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java
    myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java

Propchange: myfaces/trinidad/branches/trinidad-1.2.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 26 18:00:12 2011
@@ -8,4 +8,4 @@
 /myfaces/trinidad/branches/anrobins_1.2.12.3_visitTree_3:984258-984269
 /myfaces/trinidad/branches/anrobins_1.2.12.3_visitTree_4:984270-988607
 /myfaces/trinidad/branches/jwaldman_StyleMap:754977-770778
-/myfaces/trinidad/trunk:930425,932153,1002826,1031716,1076418,1096803,1096816
+/myfaces/trinidad/trunk:930425,932153,1002826,1031716,1076418,1096803,1096816,1096825

Modified: myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java?rev=1096828&r1=1096827&r2=1096828&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java (original)
+++ myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java Tue Apr 26 18:00:12 2011
@@ -554,6 +554,25 @@ abstract public class UIXTableTemplate e
     @Override
     public Object getProperty(PropertyKey key)
     {
+      if (key == _DISCLOSED_ROW_KEYS_WITHOUT_MODEL_KEY)
+      {
+        // This case is only true if the table is trying to serialize the disclosed row keys to
+        // the stamp state of a parent UIXCollection. This work-around prevents EL evaluation to
+        // get the collection model during stamp state saving. This should be permissible as the
+        // state saving code does not need the collection model to be set in the row key set in
+        // order to save its state.
+        return super.getProperty(DISCLOSED_ROW_KEYS_KEY);
+      }
+      else if (key == _SELECTED_ROW_KEYS_WITHOUT_MODEL_KEY)
+      {
+        // This case is only true if the table is trying to serialize the selected row keys to
+        // the stamp state of a parent UIXCollection. This work-around prevents EL evaluation to
+        // get the collection model during stamp state saving. This should be permissible as the
+        // state saving code does not need the collection model to be set in the row key set in
+        // order to save its state.
+        return super.getProperty(SELECTED_ROW_KEYS_KEY);
+      }
+
       Object value = super.getProperty(key);
       if (key == DISCLOSED_ROW_KEYS_KEY)
       {
@@ -597,24 +616,6 @@ abstract public class UIXTableTemplate e
           }
         }
       }
-      else if (key == _DISCLOSED_ROW_KEYS_WITHOUT_MODEL_KEY)
-      {
-        // This case is only true if the table is trying to serialize the disclosed row keys to
-        // the stamp state of a parent UIXCollection. This work-around prevents EL evaluation to
-        // get the collection model during stamp state saving. This should be permissible as the
-        // state saving code does not need the collection model to be set in the row key set in
-        // order to save its state.
-        value = super.getProperty(DISCLOSED_ROW_KEYS_KEY);
-      }
-      else if (key == _SELECTED_ROW_KEYS_WITHOUT_MODEL_KEY)
-      {
-        // This case is only true if the table is trying to serialize the selected row keys to
-        // the stamp state of a parent UIXCollection. This work-around prevents EL evaluation to
-        // get the collection model during stamp state saving. This should be permissible as the
-        // state saving code does not need the collection model to be set in the row key set in
-        // order to save its state.
-        value = super.getProperty(SELECTED_ROW_KEYS_KEY);
-      }
 
       return value;
     }

Modified: myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java?rev=1096828&r1=1096827&r2=1096828&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java (original)
+++ myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTemplate.java Tue Apr 26 18:00:12 2011
@@ -251,6 +251,25 @@ abstract public class UIXTreeTemplate ex
     @Override
     public Object getProperty(PropertyKey key)
     {
+      if (key == _DISCLOSED_ROW_KEYS_WITHOUT_MODEL_KEY)
+      {
+        // This case is only true if the table is trying to serialize the disclosed row keys to
+        // the stamp state of a parent UIXCollection. This work-around prevents EL evaluation to
+        // get the collection model during stamp state saving. This should be permissible as the
+        // state saving code does not need the collection model to be set in the row key set in
+        // order to save its state.
+        return super.getProperty(DISCLOSED_ROW_KEYS_KEY);
+      }
+      else if (key == _SELECTED_ROW_KEYS_WITHOUT_MODEL_KEY)
+      {
+        // This case is only true if the table is trying to serialize the selected row keys to
+        // the stamp state of a parent UIXCollection. This work-around prevents EL evaluation to
+        // get the collection model during stamp state saving. This should be permissible as the
+        // state saving code does not need the collection model to be set in the row key set in
+        // order to save its state.
+        return super.getProperty(SELECTED_ROW_KEYS_KEY);
+      }
+
       Object value = super.getProperty(key);
       if (key == DISCLOSED_ROW_KEYS_KEY)
       {
@@ -294,24 +313,6 @@ abstract public class UIXTreeTemplate ex
           }
         }
       }
-      else if (key == _DISCLOSED_ROW_KEYS_WITHOUT_MODEL_KEY)
-      {
-        // This case is only true if the table is trying to serialize the disclosed row keys to
-        // the stamp state of a parent UIXCollection. This work-around prevents EL evaluation to
-        // get the collection model during stamp state saving. This should be permissible as the
-        // state saving code does not need the collection model to be set in the row key set in
-        // order to save its state.
-        value = super.getProperty(DISCLOSED_ROW_KEYS_KEY);
-      }
-      else if (key == _SELECTED_ROW_KEYS_WITHOUT_MODEL_KEY)
-      {
-        // This case is only true if the table is trying to serialize the selected row keys to
-        // the stamp state of a parent UIXCollection. This work-around prevents EL evaluation to
-        // get the collection model during stamp state saving. This should be permissible as the
-        // state saving code does not need the collection model to be set in the row key set in
-        // order to save its state.
-        value = super.getProperty(SELECTED_ROW_KEYS_KEY);
-      }
       return value;
     }