You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2009/11/30 16:18:59 UTC

svn commit: r885449 - /myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java

Author: matzew
Date: Mon Nov 30 15:18:59 2009
New Revision: 885449

URL: http://svn.apache.org/viewvc?rev=885449&view=rev
Log:
made isVisitable() more readable. Took code from Apache MyFaces Trinidad

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java?rev=885449&r1=885448&r2=885449&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java Mon Nov 30 15:18:59 2009
@@ -267,14 +267,20 @@
      */
     protected boolean isVisitable(VisitContext context) {
 
-        Set <VisitHint> visitHints = context.getHints();
-        boolean retVal = !((visitHints.contains(VisitHint.SKIP_UNRENDERED)  && !this.isRendered()) ||
-           (visitHints.contains(VisitHint.SKIP_TRANSIENT) && this.isTransient()));
+        Collection<VisitHint> hints = context.getHints();
+
+        if (hints.contains(VisitHint.SKIP_TRANSIENT) && this.isTransient())
+            return false;
+
+        if (hints.contains(VisitHint.SKIP_UNRENDERED) && !this.isRendered())
+            return false;
+
         //executable cannot be handled here because we do not have any method to determine
         //whether a component is executable or not, this seems to be a hole in the spec!
         //but we can resolve it on ppr context level, where it is needed!
         //maybe in the long run we can move it down here, if it makes sense
-        return retVal;
+
+        return true;
     }
 
     /**