You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bs...@apache.org on 2010/02/09 19:34:07 UTC

svn commit: r908149 [2/2] - in /myfaces/trinidad/branches/1.2.12.2-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/apac...

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java Tue Feb  9 18:34:05 2010
@@ -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
@@ -19,11 +19,12 @@
 package org.apache.myfaces.trinidad.component;
 
 import java.util.Collections;
-
 import java.util.List;
 
 import javax.faces.component.UIComponent;
 
+import org.apache.myfaces.trinidad.component.visit.VisitCallback;
+import org.apache.myfaces.trinidad.component.visit.VisitContext;
 import org.apache.myfaces.trinidad.model.CollectionModel;
 import org.apache.myfaces.trinidad.model.LocalRowKeyIndex;
 import org.apache.myfaces.trinidad.model.ModelUtils;
@@ -37,7 +38,7 @@
  *
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-api/src/main/java/oracle/adf/view/faces/component/UIXHierarchy.java#0 $) $Date: 10-nov-2005.19:09:52 $
  */
-abstract public class UIXHierarchy extends UIXCollection implements CollectionComponent, LocalRowKeyIndex, 
+public abstract class UIXHierarchy extends UIXCollection implements CollectionComponent, LocalRowKeyIndex, 
              TreeLocalRowKeyIndex
 {
   /**
@@ -58,7 +59,7 @@
   public CollectionModel createCollectionModel(CollectionModel current, Object value)
   {
     TreeModel model = ModelUtils.toTreeModel(value);
-    model.setRowKey(null);    
+    model.setRowKey(null);
     return model;
   }
 
@@ -80,7 +81,7 @@
   public int getRows()
   {
     return 0;
-  }  
+  }
   
   /**
   * Treats the current element as a parent element and steps into the children.
@@ -128,7 +129,6 @@
    */
   public boolean isContainerEmpty()
   {
-    
     return getTreeModel().isContainerEmpty();
   }
 
@@ -265,7 +265,6 @@
     return getTreeModel().areRowsLocallyAvailable(rowCount, disclosedRowKeys);
   }
 
-
   /**
    * Gets the TreeModel that this tree is displaying.
    */
@@ -273,7 +272,7 @@
   {
     TreeModel model = (TreeModel) getCollectionModel();
     return model;
-  } 
+  }
   
   @Override
   protected List<UIComponent> getStamps()
@@ -283,7 +282,94 @@
       return Collections.singletonList(nodeStamp);
     else
       return Collections.emptyList();
-  }  
+  }
 
   abstract public Object getFocusRowKey();
+
+  protected final boolean visitLevel(
+    VisitContext      visitContext,
+    VisitCallback     callback,
+    List<UIComponent> stamps)
+  {
+    if (getRowCount() != 0)
+    {      
+      if (!stamps.isEmpty())
+      {
+        int oldRow = getRowIndex();
+        int first = getFirst();
+        int last = TableUtils.getLast(this, first);
+
+        try
+        {
+          for (int i = first; i <= last; i++)
+          {
+            setRowIndex(i);
+
+            for (UIComponent currStamp : stamps)
+            {
+              // visit the stamps.  If we have visited all of the visit targets then return early
+              if (UIXComponent.visitTree(visitContext, currStamp, callback))
+                return true;
+            }
+          }
+        }
+        finally
+        {
+          setRowIndex(oldRow);          
+        }
+      }
+    }
+    
+    return false;
+  }
+  
+  protected final boolean visitHierarchy(
+    VisitContext      visitContext,
+    VisitCallback     callback,
+    List<UIComponent> stamps,
+    RowKeySet         disclosedRowKeys)
+  {
+    int oldRow = getRowIndex();
+    int first = getFirst();
+    int last = TableUtils.getLast(this, first);
+
+    try
+    {  
+      for(int i = first; i <= last; i++)
+      {
+        setRowIndex(i);
+        if (!stamps.isEmpty())
+        {
+          for (UIComponent currStamp : stamps)
+          {
+            // visit the stamps.  If we have visited all of the visit targets then return early
+            if (UIXComponent.visitTree(visitContext, currStamp, callback))
+              return true;
+          }
+        }
+                
+        if (isContainer() && ((disclosedRowKeys == null) || disclosedRowKeys.isContained()))
+        {
+          enterContainer();
+          
+          try
+          {
+            // visit this container.  If we have visited all of the visit targets then return early
+            if (visitHierarchy(visitContext, callback, stamps, disclosedRowKeys));
+              return true;
+          }
+          finally
+          {
+            exitContainer();
+          }
+        }
+      }
+    }
+    finally
+    {
+      setRowIndex(oldRow);
+    }    
+ 
+    return false;
+  }
 }

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/visit/VisitCallback.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/visit/VisitCallback.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/visit/VisitCallback.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/visit/VisitCallback.java Tue Feb  9 18:34:05 2010
@@ -27,7 +27,8 @@
  * taking action on a specific UIComponent (either facet or child) during 
  * a component tree visit.</p>
  *
- * @see org.apache.myfaces.trinidad.component.UIXComponent#visitTree UIComponent.visitTree()
+ * @see org.apache.myfaces.trinidad.component.UIXComponent#visitTree(VisitContext, VisitCallback)
+ * UIComponent.visitTree()
  */
 public interface VisitCallback
 {
@@ -39,7 +40,7 @@
      * to be in the proper state with respect to its ancestors in the
      * View.</p>
      *
-     * @param context the {@link VisitContext} for this tree visit.
+     * @param visitContext the {@link VisitContext} for this tree visit.
      *
      * @param target the {@link UIComponent} to visit
      *
@@ -47,5 +48,5 @@
      *   visiting the component's subtree, skip visiting the component's
      *   subtree or end the visit.
      */
-    public VisitResult visit(VisitContext context, UIComponent target);
+    public VisitResult visit(VisitContext visitContext, UIComponent target);
 }

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/visit/VisitContext.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/visit/VisitContext.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/visit/VisitContext.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/visit/VisitContext.java Tue Feb  9 18:34:05 2010
@@ -34,11 +34,12 @@
  * state relating to a component tree visit.</p>
  *
  * <p>Component tree visits are initiated by calling
- * {@link org.apache.myfaces.trinidad.component.UIXComponent#visitTree UIComponent.visitTree()},
+ * {@link org.apache.myfaces.trinidad.component.UIXComponent#visitTree(VisitContext,UIComponent,VisitCallback)
+ * UIComponent.visitTree()},
  * at which point both a {@link VisitContext} and a {@link VisitCallback}
  * must be provided.
  *
- * @see org.apache.myfaces.trinidad.component.UIXComponent#visitTree UIXComponent.visitTree()
+ * @see org.apache.myfaces.trinidad.component.UIXComponent#visitTree(VisitContext,UIComponent,VisitCallback) UIXComponent.visitTree()
  * @see VisitCallback
  *
  */

Modified: myfaces/trinidad/branches/1.2.12.2-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.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java Tue Feb  9 18:34:05 2010
@@ -96,7 +96,7 @@
 
   /**
    * <p>
-   * Called before rendering the current component's children in order to set
+   * Called before rendering the current comopnent's children in order to set
    * up any special context.
    * </p>
    * <p>If <code>setupEncodingContext</code> succeeds then
@@ -105,31 +105,53 @@
    * <p>The default implementation does nothing</p>
    * @param context FacesContext for this request
    * @param rc RenderingContext for this encoding pass
-   * @ param component Component to encode using this Renderer
+   * @param component Component to encode using this Renderer
    * @see #tearDownEncodingContext
    */
   public void setupEncodingContext(
     FacesContext context,
     RenderingContext rc,
-    UIXComponent component)
+    UIComponent component)
   {
+    // TODO Remove after one release
+    if (component instanceof UIXComponent)
+      setupEncodingContext(context, rc, (UIXComponent)component);
   }
 
+  // TODO Remove after one release
+  @Deprecated
   public void setupEncodingContext(
-    FacesContext context,
-    RenderingContext rc,
-    UIComponent component)
+    @SuppressWarnings("unused") FacesContext context,
+    @SuppressWarnings("unused") RenderingContext rc,
+    @SuppressWarnings("unused") UIXComponent component)
   {
-    // temporary hack to change UIComponent.  Once the change has propagated through, we will
-    // remove the UIXComponent version.
-    // We need to support UIComponents so that we can use CoreRenderers against non-UIXComponents
-    if (component instanceof UIXComponent)
-      setupEncodingContext(context, rc, (UIXComponent)component);
   }
 
+
   /**
    * <p>
-   * Called after rendering the current component's children in order to tear
+   * Called before rendering the current component's children in order to set
+   * up any special context.
+   * </p>
+   * <p>If <code>setupChildrenEncodingContext</code> succeeds then
+   * <code>tearDownChildrenEncodingContext</code> will be called for the same component.
+   * </p>
+   * <p>The default implementation does nothing</p>
+   * @param context FacesContext for this request
+   * @param rc RenderingContext for this encoding pass
+   * @param component Component to encode using this Renderer
+   * @see #tearDownChildrenEncodingContext
+   */
+  public void setupChildrenEncodingContext(
+    @SuppressWarnings("unused") FacesContext context,
+    @SuppressWarnings("unused") RenderingContext rc,
+    @SuppressWarnings("unused") UIComponent component)
+  {
+  }
+
+  /**
+   * <p>
+   * Called after rendering the current component in order to tear
    * down any special context.
    * </p>
    * <p>
@@ -139,28 +161,49 @@
    * <p>The default implementation does nothing</p>
    * @param context FacesContext for this request
    * @param rc RenderingContext for this encoding pass
-   * @ param component Component to encode using this Renderer
+   * @param component Component to encode using this Renderer
    * @see #setupEncodingContext
    */
   public void tearDownEncodingContext(
     FacesContext context,
     RenderingContext rc,
-    UIXComponent     component)
+    UIComponent     component)
   {
+    // TODO Remove after one release
+    if (component instanceof UIXComponent)
+      tearDownEncodingContext(context, rc, (UIXComponent)component);
   }
 
+  // TODO Remove after one release
+  @Deprecated
   public void tearDownEncodingContext(
-    FacesContext context,
-    RenderingContext rc,
-    UIComponent     component)
+    @SuppressWarnings("unused") FacesContext context,
+    @SuppressWarnings("unused") RenderingContext rc,
+    @SuppressWarnings("unused") UIXComponent     component)
   {
-    // temporary hack to change UIComponent.  Once the change has propagated through, we will
-    // remove the UIXComponent version.
-    // We need to support UIComponents so that we can use CoreRenderers against non-UIXComponents
-    if (component instanceof UIXComponent)
-      tearDownEncodingContext(context, rc, (UIXComponent)component);
   }
 
+  /**
+   * <p>
+   * Called after rendering the current component's children in order to tear
+   * down any special context.
+   * </p>
+   * <p>
+   * <code>tearDownChildrenEncodingContext</code> will be called on the component if
+   * <code>setupChildrenEncodingContext</code> succeeded.
+   * </p>
+   * <p>The default implementation does nothing</p>
+   * @param context FacesContext for this request
+   * @param rc RenderingContext for this encoding pass
+   * @param component Component to encode using this Renderer
+   * @see #setupChildrenEncodingContext
+   */
+  public void tearDownChildrenEncodingContext(
+    @SuppressWarnings("unused") FacesContext context,
+    @SuppressWarnings("unused") RenderingContext rc,
+    @SuppressWarnings("unused") UIComponent component)
+  {
+  }
 
   //
   // COERCION HELPERS
@@ -223,6 +266,7 @@
    * Coerces an object into a resource URI, calling the view-handler.
    * @deprecated use toResourceUri
    */
+  @Deprecated
   static public String toUri(Object o)
   {
     return toResourceUri(FacesContext.getCurrentInstance(),o);

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/CollectionUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/CollectionUtils.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/CollectionUtils.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/CollectionUtils.java Tue Feb  9 18:34:05 2010
@@ -1288,8 +1288,6 @@
   private static final Class<? extends List> _SYNCHRONIZED_LIST;
   private static final Class<? extends Set> _EMPTY_SET = Collections.emptySet().getClass();
   private static final Class<? extends Set> _SINGLETON_SET = Collections.singleton(null).getClass();
-  
-
   private static final Queue _EMPTY_QUEUE = new EmptyQueue();
   private static final Iterator _EMPTY_ITERATOR = new EmptyIterator();
   private static final Iterator _EMPTY_LIST_ITERATOR = new EmptyListIterator();

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIComponentTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIComponentTestCase.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIComponentTestCase.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIComponentTestCase.java Tue Feb  9 18:34:05 2010
@@ -26,6 +26,8 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+
+import java.util.Collections;
 import java.util.Map;
 import javax.faces.component.EditableValueHolder;
 import javax.faces.component.UIComponent;
@@ -692,6 +694,8 @@
     
     mock.stubs().method("getParent").will(returnValue(null));
     mock.stubs().method("setParent");
+    mock.stubs().method("getFacetsAndChildren").will(returnIterator(Collections.emptyList()));
+
     mock.expects(never()).method("processRestoreState");
     mock.expects(never()).method("processDecodes");
     mock.expects(never()).method("processValidators");

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIXProcessTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIXProcessTest.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIXProcessTest.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIXProcessTest.java Tue Feb  9 18:34:05 2010
@@ -20,12 +20,16 @@
 
 import java.io.IOException;
 
+import javax.faces.component.UIComponentBase;
+
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.myfaces.trinidad.component.UIComponentTestCase;
 
+import org.jmock.Mock;
+
 /**
  * Unit tests for UIXProcess
  *
@@ -133,4 +137,16 @@
     UIXProcess component = new UIXProcess();
     doTestRenderResponse(component);
   }
+  
+  protected Mock createMockUIComponent()
+  {
+    // the UIXProcess is allowed to call getId and setId on its child
+    Mock mock = super.createMockUIComponent();
+    
+    mock.stubs().method("getId");
+    mock.stubs().method("setId");
+        
+    return mock;
+  }
+
 }

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/core/nav/CoreBreadCrumbsTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/core/nav/CoreBreadCrumbsTest.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/core/nav/CoreBreadCrumbsTest.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/core/nav/CoreBreadCrumbsTest.java Tue Feb  9 18:34:05 2010
@@ -25,6 +25,8 @@
 
 import org.apache.myfaces.trinidad.component.UIComponentTestCase;
 
+import org.jmock.Mock;
+
 /**
  * Unit tests for CoreBreadCrumbs.
  *
@@ -136,4 +138,15 @@
     CoreBreadCrumbs component = new CoreBreadCrumbs();
     doTestRenderResponse(component);
   }
+
+  protected Mock createMockUIComponent()
+  {
+    // the BreadCrumbs is allowed to call getId and setId on its child
+    Mock mock = super.createMockUIComponent();
+    
+    mock.stubs().method("getId");
+    mock.stubs().method("setId");
+        
+    return mock;
+  }
 }

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FullVisitContext.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FullVisitContext.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FullVisitContext.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/FullVisitContext.java Tue Feb  9 18:34:05 2010
@@ -33,6 +33,7 @@
 import org.apache.myfaces.trinidad.component.visit.VisitContext;
 import org.apache.myfaces.trinidad.component.visit.VisitHint;
 import org.apache.myfaces.trinidad.component.visit.VisitResult;
+import org.apache.myfaces.trinidad.util.CollectionUtils;
 
 /**
  *
@@ -80,11 +81,10 @@
     _phaseId = phaseId;
 
     // Copy and store hints - ensure unmodifiable and non-empty
-    EnumSet<VisitHint> hintsEnumSet = ((hints == null) || (hints.isEmpty()))
-                                          ? EnumSet.noneOf(VisitHint.class)
-                                          : EnumSet.copyOf(hints);
-
-    _hints = Collections.unmodifiableSet(hintsEnumSet);
+    if (hints == null)
+      _hints = Collections.emptySet();
+    else
+      _hints = CollectionUtils.unmodifiableCopyOfEnumSet(hints);
   }
 
   /**

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/PartialVisitContext.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/PartialVisitContext.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/PartialVisitContext.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/PartialVisitContext.java Tue Feb  9 18:34:05 2010
@@ -41,6 +41,7 @@
 import org.apache.myfaces.trinidad.component.visit.VisitContext;
 import org.apache.myfaces.trinidad.component.visit.VisitHint;
 import org.apache.myfaces.trinidad.component.visit.VisitResult;
+import org.apache.myfaces.trinidad.util.CollectionUtils;
 
 /**
  * <p>A VisitContext implementation that is
@@ -130,12 +131,11 @@
     _clientIds.addAll(clientIdSet);
 
     // Copy and store hints - ensure unmodifiable and non-empty
-    EnumSet<VisitHint> hintsEnumSet = ((hints == null) || (hints.isEmpty()))
-                                        ? EnumSet.noneOf(VisitHint.class)
-                                        : EnumSet.copyOf(hints);
-
-    _hints = Collections.unmodifiableSet(hintsEnumSet);
-  }
+    if (hints == null)
+      _hints = Collections.emptySet();
+    else
+      _hints = CollectionUtils.unmodifiableCopyOfEnumSet(hints);
+   }
 
   /**
    * @see VisitContext#getFacesContext VisitContext.getFacesContext()

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/PartialPageContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/PartialPageContextImpl.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/PartialPageContextImpl.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/PartialPageContextImpl.java Tue Feb  9 18:34:05 2010
@@ -378,8 +378,6 @@
     {
       // First sure that we should visit this component - ie.
       // that this component is represented in our id set.
-      String clientId = _getVisitId(component);
-
       VisitResult result;
      
       if (component instanceof UIXComponent)
@@ -422,33 +420,12 @@
     public Set<VisitHint> getHints()
     {
       return _PPR_VISIT_HINTS;
-    }
-
-    // Tests whether the specified component should be visited.
-    // If so, returns its client id.  If not, returns null.
-    private String _getVisitId(UIComponent component)
-    {
-      // We first check to see whether the component's id
-      // is in our id collection.  We do this before checking
-      // for the full client id because getting the full client id
-      // is more expensive than just getting the local id.
-      String id = component.getId();
-
-      if ((id != null) && !_targetIds.contains(id))
-        return null;
-
-      // The id was a match - now check the client id.
-      // note that client id should never be null (should be
-      // generated even if id is null, so asserting this.)
-      String clientId = component.getClientId(getFacesContext());
-      assert(clientId != null);
-
-      return _targets.containsKey(clientId) ? clientId : null;
-    }                                                                      
+    }                                                             
   }
 
-  private static final Set<VisitHint> _PPR_VISIT_HINTS = EnumSet.of(VisitHint.SKIP_UNRENDERED,
-                                                                    VisitHint.EXECUTE_LIFECYCLE);
+  private static final Set<VisitHint> _PPR_VISIT_HINTS = Collections.unmodifiableSet(
+                                                         EnumSet.of(VisitHint.SKIP_UNRENDERED,
+                                                                    VisitHint.EXECUTE_LIFECYCLE));
   private final FacesContext _context;
   
   // if the value is TRUE, then this target has been rendered.  If false, it has yet to be rendered

Modified: myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java?rev=908149&r1=908148&r2=908149&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java (original)
+++ myfaces/trinidad/branches/1.2.12.2-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java Tue Feb  9 18:34:05 2010
@@ -105,15 +105,6 @@
     _targetFrameKey = type.findKey("targetFrame");
   }
 
-  @Override
-  public void setupEncodingContext(
-    FacesContext context,
-    RenderingContext rc,
-    UIXComponent component)
-  {
-    // temp hack
-    setupEncodingContext(context, rc, (UIComponent)component);
-  }
   
   @Override
   public void setupEncodingContext(
@@ -425,16 +416,6 @@
     if (postscriptId != null)
       rw.endElement("span");
   }
-
-  @Override
-  public void tearDownEncodingContext(
-    FacesContext context,
-    RenderingContext rc,
-    UIXComponent     component)
-  {
-    // temp hack
-    tearDownEncodingContext(context, rc, (UIComponent)component);
-  }
   
   @Override
   public void tearDownEncodingContext(