myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r980290 - /myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlMessageRendererBase.java
Date Thu, 29 Jul 2010 02:20:58 GMT
Author: lu4242
Date: Thu Jul 29 02:20:58 2010
New Revision: 980290

URL: http://svn.apache.org/viewvc?rev=980290&view=rev
Log:
TOMAHAWK-1530 Create tests for clientEvent properties

Modified:
    myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlMessageRendererBase.java

Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlMessageRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlMessageRendererBase.java?rev=980290&r1=980289&r2=980290&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlMessageRendererBase.java
(original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlMessageRendererBase.java
Thu Jul 29 02:20:58 2010
@@ -183,14 +183,19 @@ public abstract class HtmlMessageRendere
             behaviors = ((ClientBehaviorHolder) message).getClientBehaviors();
         }
         
-        if (message.getId() != null && (!message.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)

-                || (behaviors != null && !behaviors.isEmpty())))
+        if ( (message.getId() != null && !message.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX))

+                || (behaviors != null && !behaviors.isEmpty()) )
         {
             span = true;
 
             writer.startElement(HTML.SPAN_ELEM, message);
 
-            if (renderId)
+            if (behaviors != null && !behaviors.isEmpty())
+            {
+                //force id rendering, because the client behavior could require it
+                writer.writeAttribute(HTML.ID_ATTR, message.getClientId(facesContext),null);
+            }
+            else if (renderId)
             {
                 HtmlRendererUtils.writeIdIfNecessary(writer, message, facesContext);
             }



Mime
View raw message