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 2010/11/04 16:26:31 UTC

svn commit: r1031031 - in /myfaces/trinidad/branches/1.2.12.3-branch: ./ trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ trinidad-api/src/main/java/org/apache...

Author: arobinson74
Date: Thu Nov  4 15:26:31 2010
New Revision: 1031031

URL: http://svn.apache.org/viewvc?rev=1031031&view=rev
Log:
TRINIDAD-1927 backport to older branch

Modified:
    myfaces/trinidad/branches/1.2.12.3-branch/   (props changed)
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXGroupTemplate.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXSwitcherTemplate.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/   (props changed)
    myfaces/trinidad/branches/1.2.12.3-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/   (props changed)

Propchange: myfaces/trinidad/branches/1.2.12.3-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov  4 15:26:31 2010
@@ -4,4 +4,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:894885,915962,962582
+/myfaces/trinidad/trunk:894885,915962,962582,1002826

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXGroupTemplate.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXGroupTemplate.java?rev=1031031&r1=1031030&r2=1031031&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXGroupTemplate.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXGroupTemplate.java Thu Nov  4 15:26:31 2010
@@ -19,6 +19,7 @@
 package org.apache.myfaces.trinidad.component;
 
 import java.io.IOException;
+
 import java.util.List;
 
 import javax.faces.component.UIComponent;
@@ -101,7 +102,7 @@ abstract public class UIXGroupTemplate e
     {
       for(UIComponent child : (List<UIComponent>)getChildren())
       {
-        __encodeRecursive(context, child);
+        child.encodeAll(context);
       }
     }
   }

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXSwitcherTemplate.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXSwitcherTemplate.java?rev=1031031&r1=1031030&r2=1031031&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXSwitcherTemplate.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXSwitcherTemplate.java Thu Nov  4 15:26:31 2010
@@ -109,7 +109,9 @@ abstract public class UIXSwitcherTemplat
   {
     UIComponent facet = _getFacet();
     if (facet != null)
-      __encodeRecursive(context, facet);
+    {
+      facet.encodeAll(context);
+  }
   }
 
 

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?rev=1031031&r1=1031030&r2=1031031&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java Thu Nov  4 15:26:31 2010
@@ -767,24 +767,6 @@ abstract public class UIXComponentBase e
     }
   }
 
-  /**
-   * Encodes a component and all of its children, whether
-   * getRendersChildren() is true or false.  When rendersChildren
-   * is false, each child whose "rendered" property is true
-   * will be sequentially rendered;  facets will be ignored.
-   */
-  @Override
-  public void encodeAll(FacesContext context) throws IOException
-  {
-    if (context == null)
-      throw new NullPointerException();
-
-    // This code ends up calling isRendered() once overall,
-    // plus up to three times more for encodeBegin(),
-    // encodeChildren(), and encodeEnd().
-    __encodeRecursive(context, this);
-  }
-
   @Override
   public void queueEvent(FacesEvent event)
   {
@@ -1490,30 +1472,13 @@ abstract public class UIXComponentBase e
   /**
    * render a component. this is called by renderers whose
    * getRendersChildren() return true.
+   * @deprecated {@link UIComponent#encodeAll(FacesContext)} should be used instead of this method
    */
+  @Deprecated
   void __encodeRecursive(FacesContext context, UIComponent component)
     throws IOException
   {
-    if (component.isRendered())
-    {
-      component.encodeBegin(context);
-      if (component.getRendersChildren())
-      {
-        component.encodeChildren(context);
-      }
-      else
-      {
-        if (component.getChildCount() > 0)
-        {
-          for(UIComponent child : component.getChildren())
-          {
-            __encodeRecursive(context, child);
-          }
-        }
-      }
-
-      component.encodeEnd(context);
-    }
+    component.encodeAll(context);
   }
 
 

Modified: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java?rev=1031031&r1=1031030&r2=1031031&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java (original)
+++ myfaces/trinidad/branches/1.2.12.3-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java Thu Nov  4 15:26:31 2010
@@ -396,26 +396,9 @@ public class CoreRenderer extends Render
     UIComponent  child) throws IOException
   {
     assert(child.isRendered());
-    child.encodeBegin(context);
-    if (child.getRendersChildren())
-    {
-      child.encodeChildren(context);
-    }
-    else
-    {
-      if (child.getChildCount() > 0)
-      {
-        for(UIComponent subChild : (List<UIComponent>)child.getChildren())
-        {
-          RenderUtils.encodeRecursive(context, subChild);
-        }
-      }
-    }
-
-    child.encodeEnd(context);
+    child.encodeAll(context);
   }
 
-
   @SuppressWarnings("unchecked")
   protected void encodeAllChildren(
     FacesContext context,
@@ -684,9 +667,9 @@ public class CoreRenderer extends Render
   {
     return (Agent.PLATFORM_GENERICPDA.equals(rc.getAgent().getPlatformName()));
   }
-  
+
   /**
-   * This method returns true if a user-agent's platform is NokiaS60 
+   * This method returns true if a user-agent's platform is NokiaS60
    * @param arc - RenderingContext of a request
    * @return boolean
    */

Propchange: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov  4 15:26:31 2010
@@ -3,4 +3,4 @@
 /myfaces/trinidad/branches/1.2.12.2-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:895708
 /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:894885,915962,962582
+/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:894885,915962,962582,1002826

Propchange: myfaces/trinidad/branches/1.2.12.3-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov  4 15:26:31 2010
@@ -3,4 +3,4 @@
 /myfaces/trinidad/branches/1.2.12.2-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:895708
 /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:894885,915962,962582
+/myfaces/trinidad/trunk/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:894885,915962,962582,1002826