Author: jdonnerstag
Date: Sun Dec 12 10:37:40 2010
New Revision: 1044788

URL: http://svn.apache.org/viewvc?rev=1044788&view=rev
Log:
Exception when calling setOutputMarkupId/PlaceholderTag on wicket:container
Issue: WICKET-3237

Modified:
    
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Component.java

Modified: 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Component.java
URL: 
http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Component.java?rev=1044788&r1=1044787&r2=1044788&view=diff
==============================================================================
--- 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Component.java
 (original)
+++ 
wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/Component.java
 Sun Dec 12 10:37:40 2010
@@ -4217,6 +4217,23 @@ public abstract class Component implemen
                final boolean stripWicketTags = ajaxRequest ||
                        
Application.get().getMarkupSettings().getStripWicketTags();
 
+               if (tag instanceof WicketTag)
+               {
+                       if (getFlag(FLAG_OUTPUT_MARKUP_ID))
+                       {
+                               log.warn(String.format(
+                                       "Markup id set on a component that is 
usually not rendered into markup. "
+                                               + "Markup id: %s, component id: 
%s, component tag: %s.", getMarkupId(),
+                                       getId(), tag.getName()));
+                       }
+                       if (getFlag(FLAG_PLACEHOLDER))
+                       {
+                               log.warn(String.format(
+                                       "Placeholder tag set on a component 
that is usually not rendered into markup. "
+                                               + "Component id: %s, component 
tag: %s.", getId(), tag.getName()));
+                       }
+               }
+               
                if (!(tag instanceof WicketTag) || !stripWicketTags)
                {
                        // Apply behavior modifiers


Reply via email to