Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8721411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:13:02+00:00 2026-06-13T07:13:02+00:00

I want to create a customized renderer for a built-in component: <h:selectOneRadio /> I

  • 0

I want to create a customized renderer for a built-in component: <h:selectOneRadio />
I would like to know, how do I determine the renderer for a built-in component in order to create my own one and extend from it?

I would like to know a mechanism to get it so I could apply it to determine the renderer for any other built-in component and not just for <h:selectOneRadio />.

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T07:13:03+00:00Added an answer on June 13, 2026 at 7:13 am

    The renderer class of a standard JSF component is implementation specific (Mojarra and MyFaces have each its own implementation) and is registered as <renderer> in the implementation-specific faces-config.xml (or an artifact of it).

    To find it out, you basically need to know the component family and renderer type first, so that you can lookup the renderer class in the implementation-specific faces-config.xml file youself.

    Your starting point is the javax.faces.component.html package summary. The <h:selectOneRadio> is represented by the HtmlSelectOneRadio component class. The introductory text of its javadoc says:

    By default, the rendererType property must be set to "javax.faces.Radio".

    There is the renderer type.

    The component family is specified as COMPONENT_FAMILY constant under "Fields inherited from UISelectOne" section of the very same javadoc. Click through to "Constant field values":

    public static final java.lang.String COMPONENT_FAMILY "javax.faces.SelectOne"

    There is the component family.

    Now, we should look in the implementation-specific faces-config.xml file (or an artifact of it). Its location/name is unfortunately nowhere documented, but I can tell that in case of Mojarra it is the com/sun/faces/jsf-ri-runtime.xml file in the implementation JAR file (you can extract JAR files with a zip tool). Open it and look for a <renderer> entry matching the component family javax.faces.SelectOne and renderer type javax.faces.Radio:

    <renderer>
        <component-family>javax.faces.SelectOne</component-family>
        <renderer-type>javax.faces.Radio</renderer-type>
        <renderer-class>
             com.sun.faces.renderkit.html_basic.RadioRenderer
        </renderer-class>
    </renderer>
    

    Finally there is it: the com.sun.faces.renderkit.html_basic.RadioRenderer.

    Please note that extending exactly that class tight couples your custom renderer to the specific JSF implementation. Your renderer would not be reuseable on a different implementation such as MyFaces. To be implementation independent, you’d need to write the entire renderer yourself which extends javax.faces.renderer.Renderer.

    See also:

    • How to findout component-family and renderer-type of a JSF component
    • What is the relationship between component family, component type and renderer type?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know, what limitations there are for how far one can
How does drupal create its own hook. Similarly i want a customized hook for
I want to create my own custom annotation (just like the Java style annotation)
I want to create a customized adapater like Mysqli because I want to add
I want to create a customized UIView class (a static lib) for some app
I created a customized CursorAdapter and want to select a list item, in order
How to create Customized UIPicker View in iphone.I want to customize the background Color,Style
How to extend zend form element to create customized currency field. For example: $amount
I want to ask how to create a customized project type in Eclipse. For
I just want ask for your comments/suggestions on how to create a customized listview

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.