[seam-commits] Seam SVN: r9192 - trunk/ui/src/main/java/org/jboss/seam/ui/util.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sat Oct 4 12:04:51 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-10-04 12:04:51 -0400 (Sat, 04 Oct 2008)
New Revision: 9192

Modified:
   trunk/ui/src/main/java/org/jboss/seam/ui/util/Decoration.java
Log:
Add comments

Modified: trunk/ui/src/main/java/org/jboss/seam/ui/util/Decoration.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/util/Decoration.java	2008-10-04 15:23:25 UTC (rev 9191)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/util/Decoration.java	2008-10-04 16:04:51 UTC (rev 9192)
@@ -10,11 +10,19 @@
 
    public static boolean hasMessage(UIComponent component, FacesContext context)
    {
+      
+      // If the component isn't to be rendered, then ignore
       if ( !component.isRendered() ) return false;
       
+      
       if ( component instanceof EditableValueHolder )
       {
+         
+         // If the component has failed validation, then it's invalid      
          if ( ! ( (EditableValueHolder) component ).isValid() ) return true;
+         
+         // If the component has a faces message attached, return true.
+         // TODO enhance this to only consider ERROR and WARN messages probably
          if ( context.getMessages( component.getClientId(context) ).hasNext() ) return true; //TODO: put this outside the if???
       }
 




More information about the seam-commits mailing list