You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Warren Bell <wa...@clarksnutrition.com> on 2005/11/11 18:58:11 UTC

Configureing a new renderer

I have a new renderer class I extended from
org.apache.myfaces.renderkit.html.HtmlMessagesRendererBase named
com.speedy.renderers.HtmlTextMessagesRenderer . I want the component
org.apache.myfaces.component.html.ext.HtmlMessages to use it. The source
code for HtmlMessages has the static variable:

DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Messages";

I am assuming this is the default renderer that the component uses and would
be the renderer-type in my configuration and the renderer class would be my
extended class. I don't know what the component family is though. Is the
component family a super class of the HtmlMessages component or something
entirely different?

<render-kit>
  <render-kit-id>some-id</render-kit-id>
  <renderer>
    <component-family>?????????</component-family>
    <renderer-type>org.apache.myfaces.Messages</renderer-type>
    <renderer-class>com.speedy.renderers.HtmlTextMessagesRenderer</renderer-
class>
  </renderer>
</render-kit>

The components hierarchy of HtmlMessages is:

...
javax.faces.component.UIComponent
  javax.faces.component.UIComponentBase
    javax.faces.component.UIMessages
      javax.faces.component.html.HtmlMessages
        org.apache.myfaces.component.html.ext.HtmlMessages

Thanks,

Warren Bell


RE: Configureing a new renderer

Posted by Warren Bell <wa...@clarksnutrition.com>.
I think that is what I was looking for. I didn't dig deep enough. I will
give it a try

> It's whatever getFamily() or getRendererType() return.  At least,
> that's the default value.   The faces-config file should have the
> authoritative value, though.
>
> In UIMessages, there are the following constants, so these are
> probably the default values.
>
>     public static final String COMPONENT_TYPE = "javax.faces.Messages";
>     public static final String COMPONENT_FAMILY = "javax.faces.Messages";
>     private static final String DEFAULT_RENDERER_TYPE =
> "javax.faces.Messages";
>
>
> On 11/11/05, Warren Bell <wa...@clarksnutrition.com> wrote:
> > How do you find out what the component-family and the
> renderer-type is for
> > t:messages? I can see what the "default renderer type" is and
> the "component
> > type" is.
> >
> > > -----Original Message-----
> > > From: Mike Kienenberger [mailto:mkienenb@gmail.com]
> > > Sent: Friday, November 11, 2005 10:33 AM
> > > To: MyFaces Discussion
> > > Subject: Re: Configureing a new renderer
> > >
> > >
> > > My understanding is that component-family is just a generic
> > > classification of the component.
> > >
> > > For example, h:message, h:messages, t:message, and t:messages would
> > > all be of the same family.   I'm not sure what it's used for, but you
> > > should be able to use whatever's already defined for h:messages.
> > >
> > > However, each component has a unique component-type value.
> > >
> > > On 11/11/05, Warren Bell <wa...@clarksnutrition.com> wrote:
> > > > I also see COMPONENT_TYPE =
> "org.apache.myfaces.HtmlMessages"; in the
> > > > HtmlMessages class. component-type and component-family are
> > > they different?
> > > >
> > > > > I have a new renderer class I extended from
> > > > > org.apache.myfaces.renderkit.html.HtmlMessagesRendererBase named
> > > > > com.speedy.renderers.HtmlTextMessagesRenderer . I want
> the component
> > > > > org.apache.myfaces.component.html.ext.HtmlMessages to use it.
> > > The source
> > > > > code for HtmlMessages has the static variable:
> > > > >
> > > > > DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Messages";
> > > > >
> > > > > I am assuming this is the default renderer that the component
> > > > > uses and would
> > > > > be the renderer-type in my configuration and the renderer class
> > > > > would be my
> > > > > extended class. I don't know what the component family is
> > > though. Is the
> > > > > component family a super class of the HtmlMessages component
> > > or something
> > > > > entirely different?
> > > > >
> > > > > <render-kit>
> > > > >   <render-kit-id>some-id</render-kit-id>
> > > > >   <renderer>
> > > > >     <component-family>?????????</component-family>
> > > > >     <renderer-type>org.apache.myfaces.Messages</renderer-type>
> > > > >
> > > > >
> > >
> <renderer-class>com.speedy.renderers.HtmlTextMessagesRenderer</renderer-
> > > > > class>
> > > > >   </renderer>
> > > > > </render-kit>
> > > > >
> > > > > The components hierarchy of HtmlMessages is:
> > > > >
> > > > > ...
> > > > > javax.faces.component.UIComponent
> > > > >   javax.faces.component.UIComponentBase
> > > > >     javax.faces.component.UIMessages
> > > > >       javax.faces.component.html.HtmlMessages
> > > > >         org.apache.myfaces.component.html.ext.HtmlMessages
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Warren Bell
> > > > >
> > > > > __________ NOD32 1.1283 (20051110) Information __________
> > > > >
> > > > > This message was checked by NOD32 antivirus system.
> > > > > http://www.eset.com
> > > > >
> > > > >
> > > >
> > > >
> >
> >


Re: Configureing a new renderer

Posted by Mike Kienenberger <mk...@gmail.com>.
It's whatever getFamily() or getRendererType() return.  At least,
that's the default value.   The faces-config file should have the
authoritative value, though.

In UIMessages, there are the following constants, so these are
probably the default values.

    public static final String COMPONENT_TYPE = "javax.faces.Messages";
    public static final String COMPONENT_FAMILY = "javax.faces.Messages";
    private static final String DEFAULT_RENDERER_TYPE = "javax.faces.Messages";


On 11/11/05, Warren Bell <wa...@clarksnutrition.com> wrote:
> How do you find out what the component-family and the renderer-type is for
> t:messages? I can see what the "default renderer type" is and the "component
> type" is.
>
> > -----Original Message-----
> > From: Mike Kienenberger [mailto:mkienenb@gmail.com]
> > Sent: Friday, November 11, 2005 10:33 AM
> > To: MyFaces Discussion
> > Subject: Re: Configureing a new renderer
> >
> >
> > My understanding is that component-family is just a generic
> > classification of the component.
> >
> > For example, h:message, h:messages, t:message, and t:messages would
> > all be of the same family.   I'm not sure what it's used for, but you
> > should be able to use whatever's already defined for h:messages.
> >
> > However, each component has a unique component-type value.
> >
> > On 11/11/05, Warren Bell <wa...@clarksnutrition.com> wrote:
> > > I also see COMPONENT_TYPE = "org.apache.myfaces.HtmlMessages"; in the
> > > HtmlMessages class. component-type and component-family are
> > they different?
> > >
> > > > I have a new renderer class I extended from
> > > > org.apache.myfaces.renderkit.html.HtmlMessagesRendererBase named
> > > > com.speedy.renderers.HtmlTextMessagesRenderer . I want the component
> > > > org.apache.myfaces.component.html.ext.HtmlMessages to use it.
> > The source
> > > > code for HtmlMessages has the static variable:
> > > >
> > > > DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Messages";
> > > >
> > > > I am assuming this is the default renderer that the component
> > > > uses and would
> > > > be the renderer-type in my configuration and the renderer class
> > > > would be my
> > > > extended class. I don't know what the component family is
> > though. Is the
> > > > component family a super class of the HtmlMessages component
> > or something
> > > > entirely different?
> > > >
> > > > <render-kit>
> > > >   <render-kit-id>some-id</render-kit-id>
> > > >   <renderer>
> > > >     <component-family>?????????</component-family>
> > > >     <renderer-type>org.apache.myfaces.Messages</renderer-type>
> > > >
> > > >
> > <renderer-class>com.speedy.renderers.HtmlTextMessagesRenderer</renderer-
> > > > class>
> > > >   </renderer>
> > > > </render-kit>
> > > >
> > > > The components hierarchy of HtmlMessages is:
> > > >
> > > > ...
> > > > javax.faces.component.UIComponent
> > > >   javax.faces.component.UIComponentBase
> > > >     javax.faces.component.UIMessages
> > > >       javax.faces.component.html.HtmlMessages
> > > >         org.apache.myfaces.component.html.ext.HtmlMessages
> > > >
> > > > Thanks,
> > > >
> > > > Warren Bell
> > > >
> > > > __________ NOD32 1.1283 (20051110) Information __________
> > > >
> > > > This message was checked by NOD32 antivirus system.
> > > > http://www.eset.com
> > > >
> > > >
> > >
> > >
>
>

RE: Configureing a new renderer

Posted by Warren Bell <wa...@clarksnutrition.com>.
How do you find out what the component-family and the renderer-type is for
t:messages? I can see what the "default renderer type" is and the "component
type" is.

> -----Original Message-----
> From: Mike Kienenberger [mailto:mkienenb@gmail.com]
> Sent: Friday, November 11, 2005 10:33 AM
> To: MyFaces Discussion
> Subject: Re: Configureing a new renderer
>
>
> My understanding is that component-family is just a generic
> classification of the component.
>
> For example, h:message, h:messages, t:message, and t:messages would
> all be of the same family.   I'm not sure what it's used for, but you
> should be able to use whatever's already defined for h:messages.
>
> However, each component has a unique component-type value.
>
> On 11/11/05, Warren Bell <wa...@clarksnutrition.com> wrote:
> > I also see COMPONENT_TYPE = "org.apache.myfaces.HtmlMessages"; in the
> > HtmlMessages class. component-type and component-family are
> they different?
> >
> > > I have a new renderer class I extended from
> > > org.apache.myfaces.renderkit.html.HtmlMessagesRendererBase named
> > > com.speedy.renderers.HtmlTextMessagesRenderer . I want the component
> > > org.apache.myfaces.component.html.ext.HtmlMessages to use it.
> The source
> > > code for HtmlMessages has the static variable:
> > >
> > > DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Messages";
> > >
> > > I am assuming this is the default renderer that the component
> > > uses and would
> > > be the renderer-type in my configuration and the renderer class
> > > would be my
> > > extended class. I don't know what the component family is
> though. Is the
> > > component family a super class of the HtmlMessages component
> or something
> > > entirely different?
> > >
> > > <render-kit>
> > >   <render-kit-id>some-id</render-kit-id>
> > >   <renderer>
> > >     <component-family>?????????</component-family>
> > >     <renderer-type>org.apache.myfaces.Messages</renderer-type>
> > >
> > >
> <renderer-class>com.speedy.renderers.HtmlTextMessagesRenderer</renderer-
> > > class>
> > >   </renderer>
> > > </render-kit>
> > >
> > > The components hierarchy of HtmlMessages is:
> > >
> > > ...
> > > javax.faces.component.UIComponent
> > >   javax.faces.component.UIComponentBase
> > >     javax.faces.component.UIMessages
> > >       javax.faces.component.html.HtmlMessages
> > >         org.apache.myfaces.component.html.ext.HtmlMessages
> > >
> > > Thanks,
> > >
> > > Warren Bell
> > >
> > > __________ NOD32 1.1283 (20051110) Information __________
> > >
> > > This message was checked by NOD32 antivirus system.
> > > http://www.eset.com
> > >
> > >
> >
> >


Re: Configureing a new renderer

Posted by Mike Kienenberger <mk...@gmail.com>.
My understanding is that component-family is just a generic
classification of the component.

For example, h:message, h:messages, t:message, and t:messages would
all be of the same family.   I'm not sure what it's used for, but you
should be able to use whatever's already defined for h:messages.

However, each component has a unique component-type value.

On 11/11/05, Warren Bell <wa...@clarksnutrition.com> wrote:
> I also see COMPONENT_TYPE = "org.apache.myfaces.HtmlMessages"; in the
> HtmlMessages class. component-type and component-family are they different?
>
> > I have a new renderer class I extended from
> > org.apache.myfaces.renderkit.html.HtmlMessagesRendererBase named
> > com.speedy.renderers.HtmlTextMessagesRenderer . I want the component
> > org.apache.myfaces.component.html.ext.HtmlMessages to use it. The source
> > code for HtmlMessages has the static variable:
> >
> > DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Messages";
> >
> > I am assuming this is the default renderer that the component
> > uses and would
> > be the renderer-type in my configuration and the renderer class
> > would be my
> > extended class. I don't know what the component family is though. Is the
> > component family a super class of the HtmlMessages component or something
> > entirely different?
> >
> > <render-kit>
> >   <render-kit-id>some-id</render-kit-id>
> >   <renderer>
> >     <component-family>?????????</component-family>
> >     <renderer-type>org.apache.myfaces.Messages</renderer-type>
> >
> > <renderer-class>com.speedy.renderers.HtmlTextMessagesRenderer</renderer-
> > class>
> >   </renderer>
> > </render-kit>
> >
> > The components hierarchy of HtmlMessages is:
> >
> > ...
> > javax.faces.component.UIComponent
> >   javax.faces.component.UIComponentBase
> >     javax.faces.component.UIMessages
> >       javax.faces.component.html.HtmlMessages
> >         org.apache.myfaces.component.html.ext.HtmlMessages
> >
> > Thanks,
> >
> > Warren Bell
> >
> > __________ NOD32 1.1283 (20051110) Information __________
> >
> > This message was checked by NOD32 antivirus system.
> > http://www.eset.com
> >
> >
>
>

RE: Configureing a new renderer

Posted by Warren Bell <wa...@clarksnutrition.com>.
I also see COMPONENT_TYPE = "org.apache.myfaces.HtmlMessages"; in the
HtmlMessages class. component-type and component-family are they different?

> I have a new renderer class I extended from
> org.apache.myfaces.renderkit.html.HtmlMessagesRendererBase named
> com.speedy.renderers.HtmlTextMessagesRenderer . I want the component
> org.apache.myfaces.component.html.ext.HtmlMessages to use it. The source
> code for HtmlMessages has the static variable:
>
> DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Messages";
>
> I am assuming this is the default renderer that the component
> uses and would
> be the renderer-type in my configuration and the renderer class
> would be my
> extended class. I don't know what the component family is though. Is the
> component family a super class of the HtmlMessages component or something
> entirely different?
>
> <render-kit>
>   <render-kit-id>some-id</render-kit-id>
>   <renderer>
>     <component-family>?????????</component-family>
>     <renderer-type>org.apache.myfaces.Messages</renderer-type>
>
> <renderer-class>com.speedy.renderers.HtmlTextMessagesRenderer</renderer-
> class>
>   </renderer>
> </render-kit>
>
> The components hierarchy of HtmlMessages is:
>
> ...
> javax.faces.component.UIComponent
>   javax.faces.component.UIComponentBase
>     javax.faces.component.UIMessages
>       javax.faces.component.html.HtmlMessages
>         org.apache.myfaces.component.html.ext.HtmlMessages
>
> Thanks,
>
> Warren Bell
>
> __________ NOD32 1.1283 (20051110) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>