You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/03/26 17:00:32 UTC

svn commit: r1085750 - /myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java

Author: lu4242
Date: Sat Mar 26 16:00:32 2011
New Revision: 1085750

URL: http://svn.apache.org/viewvc?rev=1085750&view=rev
Log:
MYFACES-3090 Implement VisitHint.SKIP_ITERATION hint in UIRepeat

Modified:
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java?rev=1085750&r1=1085749&r2=1085750&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java (original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/view/facelets/component/UIRepeat.java Sat Mar 26 16:00:32 2011
@@ -40,6 +40,7 @@ import javax.faces.component.UIData;
 import javax.faces.component.UINamingContainer;
 import javax.faces.component.visit.VisitCallback;
 import javax.faces.component.visit.VisitContext;
+import javax.faces.component.visit.VisitHint;
 import javax.faces.component.visit.VisitResult;
 import javax.faces.context.FacesContext;
 import javax.faces.event.AbortProcessingException;
@@ -66,7 +67,7 @@ public class UIRepeat extends UIComponen
 
     public static final String COMPONENT_FAMILY = "facelets";
     
-    private static final String SKIP_ITERATION_HINT = "javax.faces.visit.SKIP_ITERATION";
+    //private static final String SKIP_ITERATION_HINT = "javax.faces.visit.SKIP_ITERATION";
 
     private final static DataModel<?> EMPTY_MODEL = new ListDataModel<Object>(Collections.emptyList());
 
@@ -744,7 +745,8 @@ public class UIRepeat extends UIComponen
         // override the behavior from UIComponent to visit
         // all children once per "row"
         
-        Boolean skipIterationHint = (Boolean) context.getFacesContext().getAttributes().get(SKIP_ITERATION_HINT);
+        //(Boolean) context.getFacesContext().getAttributes().get(SKIP_ITERATION_HINT);
+        Boolean skipIterationHint = context.getHints().contains(VisitHint.SKIP_ITERATION);
         if (skipIterationHint != null && skipIterationHint.booleanValue())
         {
             return super.visitTree(context, callback);