You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/03/22 18:51:13 UTC

svn commit: r1084269 - in /myfaces/tomahawk/trunk/core20/src: main/java/org/apache/myfaces/custom/radio/ main/java/org/apache/myfaces/renderkit/html/ext/ test/java/org/apache/myfaces/renderkit/html/ext/ test/java/org/apache/myfaces/test/utils/

Author: lu4242
Date: Tue Mar 22 17:51:13 2011
New Revision: 1084269

URL: http://svn.apache.org/viewvc?rev=1084269&view=rev
Log:
TOMAHAWK-939 t:radio should support standard pass-through attributes

Modified:
    myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/radio/AbstractHtmlRadio.java
    myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java
    myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRendererTest.java
    myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/test/utils/HtmlCheckAttributesUtil.java

Modified: myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/radio/AbstractHtmlRadio.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/radio/AbstractHtmlRadio.java?rev=1084269&r1=1084268&r2=1084269&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/radio/AbstractHtmlRadio.java (original)
+++ myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/custom/radio/AbstractHtmlRadio.java Tue Mar 22 17:51:13 2011
@@ -21,6 +21,16 @@ package org.apache.myfaces.custom.radio;
 import javax.faces.component.UIComponentBase;
 
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
+import org.apache.myfaces.component.AccesskeyProperty;
+import org.apache.myfaces.component.AlignProperty;
+import org.apache.myfaces.component.AltProperty;
+import org.apache.myfaces.component.ChangeSelectProperties;
+import org.apache.myfaces.component.DisabledClassEnabledClassProperties;
+import org.apache.myfaces.component.EventAware;
+import org.apache.myfaces.component.FocusBlurProperties;
+import org.apache.myfaces.component.StyleAware;
+import org.apache.myfaces.component.TabindexProperty;
+import org.apache.myfaces.component.UniversalProperties;
 import org.apache.myfaces.component.UserRoleAware;
 
 /**
@@ -42,7 +52,10 @@ import org.apache.myfaces.component.User
  * @version $Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (mié, 03 sep 2008) $
  */
 public abstract class AbstractHtmlRadio
-    extends UIComponentBase implements UserRoleAware
+    extends UIComponentBase implements UserRoleAware, 
+    FocusBlurProperties, ChangeSelectProperties, 
+    UniversalProperties, EventAware, AltProperty, 
+    AlignProperty, StyleAware, AccesskeyProperty, TabindexProperty, DisabledClassEnabledClassProperties
 {
     //private static final Log log = LogFactory.getLog(HtmlRadio.class);
 
@@ -89,4 +102,6 @@ public abstract class AbstractHtmlRadio
      */
     @JSFProperty(defaultValue="false")
     public abstract boolean isRenderLogicalId();
+    
+
 }

Modified: myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java?rev=1084269&r1=1084268&r2=1084269&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java (original)
+++ myfaces/tomahawk/trunk/core20/src/main/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRenderer.java Tue Mar 22 17:51:13 2011
@@ -24,7 +24,6 @@ import java.util.Map;
 
 import javax.faces.FacesException;
 import javax.faces.component.UIComponent;
-import javax.faces.component.UIInput;
 import javax.faces.component.UINamingContainer;
 import javax.faces.component.UISelectOne;
 import javax.faces.component.behavior.ClientBehavior;
@@ -36,6 +35,8 @@ import javax.faces.model.SelectItem;
 
 import org.apache.myfaces.component.UserRoleUtils;
 import org.apache.myfaces.custom.radio.HtmlRadio;
+import org.apache.myfaces.shared_tomahawk.renderkit.ClientBehaviorEvents;
+import org.apache.myfaces.shared_tomahawk.renderkit.JSFAttr;
 import org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils;
 import org.apache.myfaces.shared_tomahawk.renderkit.html.HTML;
 import org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRadioRendererBase;
@@ -65,6 +66,8 @@ public class HtmlRadioRenderer
     //private static final Log log = LogFactory.getLog(HtmlRadioRenderer.class);
 
     private static final String LAYOUT_SPREAD = "spread";
+    
+    private static final String[] LABEL_STYLES = { "labelStyle", "labelStyleClass" };
 
     public void encodeEnd(FacesContext context, UIComponent component) throws IOException
     {
@@ -176,7 +179,7 @@ public class HtmlRadioRenderer
         boolean itemDisabled = selectItem.isDisabled();
         boolean disabled = (componentDisabled || itemDisabled);
 
-        HtmlRendererUtils.renderLabel(writer, uiSelectOne, itemId, selectItem, disabled);
+        renderLabel(writer, radio, uiSelectOne, itemId, selectItem, disabled);
     }
     
     protected String renderRadio(
@@ -227,14 +230,14 @@ public class HtmlRadioRenderer
             behaviors = ((ClientBehaviorHolder) uiComponent)
                     .getClientBehaviors();
 
-            HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(facesContext, writer, uiComponent, itemId, behaviors);
-            HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext,writer, uiComponent, itemId, behaviors);
-            HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(facesContext, writer, uiComponent, itemId, behaviors);
-            HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE_AND_EVENTS);
+            renderBehaviorizedOnchangeEventHandler(facesContext, writer, radio, uiComponent, itemId, behaviors);
+            renderBehaviorizedEventHandlers(facesContext,writer, radio, uiComponent, itemId, behaviors);
+            renderBehaviorizedFieldEventHandlersWithoutOnchange(facesContext, writer, radio, uiComponent, itemId, behaviors);
+            renderHTMLAttributes(writer, radio, uiComponent, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
         }
         else
         {
-            HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE);
+            renderHTMLAttributes(writer, radio, uiComponent, HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
         }
         
         if (isDisabled(facesContext, uiComponent))
@@ -248,6 +251,161 @@ public class HtmlRadioRenderer
 
         return itemId;
     }
+    
+    public static void renderLabel(ResponseWriter writer, UIComponent radio,
+            UIComponent component, String forClientId, SelectItem item,
+            boolean disabled) throws IOException
+    {
+        writer.startElement(HTML.LABEL_ELEM, component);
+        writer.writeAttribute(HTML.FOR_ATTR, forClientId, null);
+
+        String labelClass = null;
+
+        if (disabled)
+        {
+            labelClass = (String) radio.getAttributes().get(
+                    JSFAttr.DISABLED_CLASS_ATTR);
+            if (labelClass == null)
+            {
+                labelClass = (String) component.getAttributes().get(
+                        JSFAttr.DISABLED_CLASS_ATTR);
+            }
+        }
+        else
+        {
+            labelClass = (String) radio.getAttributes().get(
+                    JSFAttr.ENABLED_CLASS_ATTR);
+            if (labelClass == null)
+            {
+                labelClass = (String) component.getAttributes().get(
+                        JSFAttr.ENABLED_CLASS_ATTR);
+            }
+        }
+        if (labelClass != null)
+        {
+            writer.writeAttribute("class", labelClass, "labelClass");
+        }
+
+        if ((item.getLabel() != null) && (item.getLabel().length() > 0))
+        {
+            // writer.write(HTML.NBSP_ENTITY);
+            writer.write(" ");
+            if (item.isEscape())
+            {
+                //writer.write(item.getLabel());
+                writer.writeText(item.getLabel(), null);
+            }
+            else
+            {
+                //writer.write(HTMLEncoder.encode (item.getLabel()));
+                writer.write(item.getLabel());
+            }
+        }
+
+        writer.endElement(HTML.LABEL_ELEM);
+    }
+
+    private static boolean renderHTMLAttributes(ResponseWriter writer,
+            UIComponent radio, UIComponent selectOne, String[] attributes) throws IOException
+    {
+        boolean somethingDone = false;
+        for (int i = 0, len = attributes.length; i < len; i++)
+        {
+            String attrName = attributes[i];
+            Object value = radio.getAttributes().get(attrName);
+            if (value == null)
+            {
+                value = selectOne.getAttributes().get(attrName);
+            }
+            if (HtmlRendererUtils.renderHTMLAttribute(writer, attrName, attrName, value ))
+            {
+                somethingDone = true;
+            }
+        }
+        return somethingDone;
+    }
+    
+    private static boolean renderBehaviorizedOnchangeEventHandler(
+            FacesContext facesContext, ResponseWriter writer, UIComponent radio, UIComponent uiComponent, String targetClientId,
+            Map<String, List<ClientBehavior>> clientBehaviors) throws IOException {
+        boolean hasChange = HtmlRendererUtils.hasClientBehavior(ClientBehaviorEvents.CHANGE, clientBehaviors, facesContext);
+        boolean hasValueChange = HtmlRendererUtils.hasClientBehavior(ClientBehaviorEvents.VALUECHANGE, clientBehaviors, facesContext);
+
+        String value = (String) radio.getAttributes().get(HTML.ONCHANGE_ATTR);
+        if (value == null)
+        {
+            value = (String) uiComponent.getAttributes().get(HTML.ONCHANGE_ATTR);
+        }
+        if (hasChange && hasValueChange) {
+            String chain = HtmlRendererUtils.buildBehaviorChain(facesContext,
+                    uiComponent, targetClientId, ClientBehaviorEvents.CHANGE, null, ClientBehaviorEvents.VALUECHANGE, null, clientBehaviors,
+                    value, null);
+            
+            return HtmlRendererUtils.renderHTMLAttribute(writer, HTML.ONCHANGE_ATTR, HTML.ONCHANGE_ATTR, chain);
+        } else if (hasChange) {
+            return HtmlRendererUtils.renderBehaviorizedAttribute(facesContext, writer, HTML.ONCHANGE_ATTR, uiComponent, targetClientId,
+                    ClientBehaviorEvents.CHANGE, null, clientBehaviors, HTML.ONCHANGE_ATTR, value);
+        } else if (hasValueChange) {
+            return HtmlRendererUtils.renderBehaviorizedAttribute(facesContext, writer, HTML.ONCHANGE_ATTR, uiComponent, targetClientId,
+                    ClientBehaviorEvents.VALUECHANGE, null, clientBehaviors, HTML.ONCHANGE_ATTR, value);
+        } else {
+            return HtmlRendererUtils.renderHTMLAttribute(writer, HTML.ONCHANGE_ATTR, HTML.ONCHANGE_ATTR, value);
+        }
+    }
+    
+    private static void renderBehaviorizedEventHandlers(
+            FacesContext facesContext, ResponseWriter writer, UIComponent radio, UIComponent uiComponent, String targetClientId,
+            Map<String, List<ClientBehavior>> clientBehaviors) throws IOException {
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONCLICK_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.CLICK, clientBehaviors, HTML.ONCLICK_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONDBLCLICK_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.DBLCLICK, clientBehaviors, HTML.ONDBLCLICK_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONMOUSEDOWN_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.MOUSEDOWN, clientBehaviors, HTML.ONMOUSEDOWN_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONMOUSEUP_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.MOUSEUP, clientBehaviors, HTML.ONMOUSEUP_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONMOUSEOVER_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.MOUSEOVER, clientBehaviors, HTML.ONMOUSEOVER_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONMOUSEMOVE_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.MOUSEMOVE, clientBehaviors, HTML.ONMOUSEMOVE_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONMOUSEOUT_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.MOUSEOUT, clientBehaviors, HTML.ONMOUSEOUT_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONKEYPRESS_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.KEYPRESS, clientBehaviors, HTML.ONKEYPRESS_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONKEYDOWN_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.KEYDOWN, clientBehaviors, HTML.ONKEYDOWN_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONKEYUP_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.KEYUP, clientBehaviors, HTML.ONKEYUP_ATTR);
+    }
+    
+    private static void renderBehaviorizedFieldEventHandlersWithoutOnchange(
+            FacesContext facesContext, ResponseWriter writer, UIComponent radio, UIComponent uiComponent, String targetClientId,
+            Map<String, List<ClientBehavior>> clientBehaviors) throws IOException {
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONFOCUS_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.FOCUS, clientBehaviors, HTML.ONFOCUS_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONBLUR_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.BLUR, clientBehaviors, HTML.ONBLUR_ATTR);
+        renderBehaviorizedAttribute(facesContext, writer, HTML.ONSELECT_ATTR, radio, uiComponent, targetClientId,
+                ClientBehaviorEvents.SELECT, clientBehaviors, HTML.ONSELECT_ATTR);
+    }
+    
+    private static boolean renderBehaviorizedAttribute(
+            FacesContext facesContext, ResponseWriter writer,
+            String componentProperty, UIComponent radio, UIComponent component, String targetClientId,
+            String eventName, Map<String, List<ClientBehavior>> clientBehaviors,
+            String htmlAttrName) throws IOException
+    {
+        String attributeValue = (String) radio.getAttributes().get(componentProperty);
+        if (attributeValue == null)
+        {
+            attributeValue = (String) component.getAttributes().get(componentProperty);
+        }
+        return HtmlRendererUtils.renderBehaviorizedAttribute(
+                facesContext, writer,
+                componentProperty, component, targetClientId,
+                eventName, null, clientBehaviors,
+                htmlAttrName, attributeValue);
+    }
 
     protected boolean isDisabled(FacesContext facesContext, UIComponent uiComponent)
     {

Modified: myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRendererTest.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRendererTest.java?rev=1084269&r1=1084268&r2=1084269&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRendererTest.java (original)
+++ myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/renderkit/html/ext/HtmlRadioRendererTest.java Tue Mar 22 17:51:13 2011
@@ -20,7 +20,9 @@ package org.apache.myfaces.renderkit.htm
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
+import javax.faces.component.UIComponent;
 import javax.faces.component.UISelectItems;
 import javax.faces.model.SelectItem;
 
@@ -28,6 +30,7 @@ import junit.framework.Test;
 import junit.framework.TestSuite;
 
 import org.apache.myfaces.component.html.ext.HtmlSelectOneRadio;
+import org.apache.myfaces.custom.radio.HtmlRadio;
 import org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase;
 import org.apache.myfaces.test.mock.MockResponseWriter;
 import org.apache.myfaces.test.utils.HtmlCheckAttributesUtil;
@@ -106,4 +109,137 @@ public class HtmlRadioRendererTest exten
             fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
         }
     }
+    
+    
+    public void testHtmlPropertyRadioPassTru() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //_AccesskeyProperty
+            new HtmlRenderedAttr("accesskey"),
+            //_UniversalProperties
+            new HtmlRenderedAttr("dir"), 
+            new HtmlRenderedAttr("lang"), 
+            new HtmlRenderedAttr("title"),
+            //_FocusBlurProperties
+            new HtmlRenderedAttr("onfocus"), 
+            new HtmlRenderedAttr("onblur"),
+            //_ChangeSelectProperties
+            new HtmlRenderedAttr("onchange"), 
+            new HtmlRenderedAttr("onselect"),
+            //_EventProperties
+            new HtmlRenderedAttr("onclick"), 
+            new HtmlRenderedAttr("ondblclick"), 
+            new HtmlRenderedAttr("onkeydown"), 
+            new HtmlRenderedAttr("onkeypress"),
+            new HtmlRenderedAttr("onkeyup"), 
+            new HtmlRenderedAttr("onmousedown"), 
+            new HtmlRenderedAttr("onmousemove"), 
+            new HtmlRenderedAttr("onmouseout"),
+            new HtmlRenderedAttr("onmouseover"), 
+            new HtmlRenderedAttr("onmouseup"),
+            //_StyleProperties
+            new HtmlRenderedAttr("style", 1), 
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\"", 1),
+            //_TabindexProperty
+            new HtmlRenderedAttr("tabindex"),
+            new HtmlRenderedAttr("id","option1", "id=\"option1\"", 1)
+        };
+        
+        List items = new ArrayList();
+        items.add(new SelectItem("mars"));
+
+        UISelectItems selectItems = new UISelectItems();
+        selectItems.setValue(items);
+
+        selectOneRadio = new HtmlSelectOneRadio();
+        
+        selectOneRadio.setId("selectOneRadio");
+        selectOneRadio.setLayout("spread");
+        
+        facesContext.getViewRoot().getChildren().add(selectOneRadio);
+        
+        selectOneRadio.getChildren().add(selectItems);
+        
+        HtmlRadio radio = new HtmlRadio();
+        radio.setId("option1");
+        radio.setIndex(0);
+        radio.setFor("selectOneRadio");
+        
+        facesContext.getViewRoot().getChildren().add(radio);
+        
+        MockResponseWriter writer = (MockResponseWriter)facesContext.getResponseWriter();
+        HtmlCheckAttributesUtil.checkRenderedAttributes(
+                radio, facesContext, writer, attrs);
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs)) {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }
+    
+    public void testHtmlPropertyRadioSelectOnePassTru() throws Exception
+    {
+        HtmlRenderedAttr[] attrs = {
+            //_AccesskeyProperty
+            new HtmlRenderedAttr("accesskey"),
+            //_UniversalProperties
+            new HtmlRenderedAttr("dir"), 
+            new HtmlRenderedAttr("lang"), 
+            new HtmlRenderedAttr("title"),
+            //_FocusBlurProperties
+            new HtmlRenderedAttr("onfocus"), 
+            new HtmlRenderedAttr("onblur"),
+            //_ChangeSelectProperties
+            new HtmlRenderedAttr("onchange"), 
+            new HtmlRenderedAttr("onselect"),
+            //_EventProperties
+            new HtmlRenderedAttr("onclick"), 
+            new HtmlRenderedAttr("ondblclick"), 
+            new HtmlRenderedAttr("onkeydown"), 
+            new HtmlRenderedAttr("onkeypress"),
+            new HtmlRenderedAttr("onkeyup"), 
+            new HtmlRenderedAttr("onmousedown"), 
+            new HtmlRenderedAttr("onmousemove"), 
+            new HtmlRenderedAttr("onmouseout"),
+            new HtmlRenderedAttr("onmouseover"), 
+            new HtmlRenderedAttr("onmouseup"),
+            //_StyleProperties
+            new HtmlRenderedAttr("style", 1), 
+            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\"", 1),
+            //_TabindexProperty
+            new HtmlRenderedAttr("tabindex")
+        };
+        
+        List items = new ArrayList();
+        items.add(new SelectItem("mars"));
+
+        UISelectItems selectItems = new UISelectItems();
+        selectItems.setValue(items);
+
+        selectOneRadio = new HtmlSelectOneRadio();
+        
+        selectOneRadio.setId("selectOneRadio");
+        selectOneRadio.setLayout("spread");
+        
+        facesContext.getViewRoot().getChildren().add(selectOneRadio);
+        
+        selectOneRadio.getChildren().add(selectItems);
+        
+        HtmlRadio radio = new HtmlRadio();
+        radio.setIndex(0);
+        radio.setFor("selectOneRadio");
+        
+        facesContext.getViewRoot().getChildren().add(radio);
+        
+        MockResponseWriter writer = (MockResponseWriter)facesContext.getResponseWriter();
+        HtmlCheckAttributesUtil.addBaseAttributes(selectOneRadio, attrs);
+        radio.encodeBegin(facesContext);
+        radio.encodeChildren(facesContext);
+        radio.encodeEnd(facesContext);
+        facesContext.renderResponse();
+        HtmlCheckAttributesUtil.checkRenderedAttributes(attrs, writer.getWriter().toString());        
+        
+        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs)) {
+            fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, writer.getWriter().toString()));
+        }
+    }    
+
 }

Modified: myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/test/utils/HtmlCheckAttributesUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/test/utils/HtmlCheckAttributesUtil.java?rev=1084269&r1=1084268&r2=1084269&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/test/utils/HtmlCheckAttributesUtil.java (original)
+++ myfaces/tomahawk/trunk/core20/src/test/java/org/apache/myfaces/test/utils/HtmlCheckAttributesUtil.java Tue Mar 22 17:51:13 2011
@@ -36,7 +36,7 @@ public class HtmlCheckAttributesUtil 
      * @param component The component to add the attributes to.
      * @param attrs     The attributes to be added to the component.
      */
-    private static void addBaseAttributes(UIComponent component, HtmlRenderedAttr[] attrs) 
+    public static void addBaseAttributes(UIComponent component, HtmlRenderedAttr[] attrs) 
     {
         Map map = component.getAttributes();
         for(int i = 0; i < attrs.length; i++) 
@@ -52,7 +52,7 @@ public class HtmlCheckAttributesUtil 
      * @param output     The html output of the component's renderer.
      * @throws Exception
      */
-    private static void checkRenderedAttributes(HtmlRenderedAttr[] attrs, String output) throws Exception 
+    public static void checkRenderedAttributes(HtmlRenderedAttr[] attrs, String output) throws Exception 
     {
         for(int i = 0; i < attrs.length; i++) 
         {
@@ -139,7 +139,7 @@ public class HtmlCheckAttributesUtil 
      * @param attr   The attribute to be tested.
      * @param actual The html generated by the renderer.
      */
-    private static void checkAttributeOccurrences(HtmlRenderedAttr attr, String actual)
+    public static void checkAttributeOccurrences(HtmlRenderedAttr attr, String actual)
     {
         String expectedHtml = attr.getExpectedHtml();