You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2007/02/09 16:58:29 UTC

Why do the Tomahawk extended components have the renderer defined in the JSP tag handler?

>From the code:

org.apache.myfaces.taglib.html.ext.HtmlPanelGridTag
=======================
public class HtmlPanelGridTag
        extends HtmlPanelGridTagBase
{
    public String getComponentType()
    {
        return HtmlPanelGrid.COMPONENT_TYPE;
    }

    public String getRendererType()
    {
        return "org.apache.myfaces.Grid";
    }
=======================


However, it's very strange that the jsp tag handler is what's defining
the renderer.
The superclass of the HtmlPanelGrid component has this:

javax.faces.component.html.HtmlPanelGrid
=======================
    private static final String DEFAULT_RENDERER_TYPE = "javax.faces.Grid";
    public HtmlPanelGrid()
    {
        setRendererType(DEFAULT_RENDERER_TYPE);
    }
=======================

Seems like an issue common to all extended classes.   Non-extended
components define the renderer in the component and set the renderer
in the constructor, keeping the renderer assocation separate from the
ViewHandler.