myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mkien...@apache.org
Subject svn commit: r400117 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlMessageRenderer.java
Date Fri, 05 May 2006 17:39:11 GMT
Author: mkienenb
Date: Fri May  5 10:39:09 2006
New Revision: 400117

URL: http://svn.apache.org/viewcvs?rev=400117&view=rev
Log:
Fix for TOMAHAWK-414 -- Ignore HtmlOutputLabels without for attributes.

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlMessageRenderer.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlMessageRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlMessageRenderer.java?rev=400117&r1=400116&r2=400117&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlMessageRenderer.java
(original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlMessageRenderer.java
Fri May  5 10:39:09 2006
@@ -222,16 +222,19 @@
             if (child instanceof HtmlOutputLabel)
             {
                 String forAttr = ((HtmlOutputLabel)child).getFor();
-                UIComponent input = child.findComponent(forAttr);
-                if (input == null)
+                if (forAttr != null)
                 {
-                    log.warn("Unable to find component '" + forAttr + "' (calling findComponent
on component '" + child.getClientId(facesContext) + "')");
-                }
-                else
-                {
-                    map.put(input.getClientId(facesContext),
-                            new MessageLabelInfo(
-                                    input,getComponentText(facesContext, (HtmlOutputLabel)child)));
+                    UIComponent input = child.findComponent(forAttr);
+                    if (input == null)
+                    {
+                        log.warn("Unable to find component '" + forAttr + "' (calling findComponent
on component '" + child.getClientId(facesContext) + "')");
+                    }
+                    else
+                    {
+                        map.put(input.getClientId(facesContext),
+                                new MessageLabelInfo(
+                                        input,getComponentText(facesContext, (HtmlOutputLabel)child)));
+                    }
                 }
             }
             else



Mime
View raw message