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

  • Home
  • SEARCH
  • 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 3669856
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:17:38+00:00 2026-05-19T02:17:38+00:00

I am trying to override renderer for h:selectBooleanCheckbox (for the reasons explained here ):

  • 0

I am trying to override renderer for h:selectBooleanCheckbox (for the reasons explained here):

However, I find it impossible to register my renderer. I have tried declaring it in my faces-config.xml:

<render-kit>
    <renderer>
        <component-family>javax.faces.SelectBoolean</component-family>
        <renderer-type>javax.faces.Checkbox</renderer-type>
        <renderer-class>com.myapp.CustomCheckboxRenderer</renderer-class>
    </renderer>
</render-kit>

The values I grabbed from:

  • component-family: javax.faces.component.html.HtmlSelectBooleanCheckbox
  • renderer-type: javax.faces.component.html.SelectBooleanCheckboxTag

But it doesn’t work.

I also tried verbosely declaring the RenderKit:

<description>Custom renderers</description>
<render-kit-id>???</render-kit-id>
<render-kit-class>com.sun.faces.renderkit.RenderKitImpl</render-kit-class>

But as you can see, I don’t really know where to grab value for render-kit-id or if the render-kit-class is correct anyway.

Inside Mojarra package there is file jsf-ri-runtime.xml but it doesn’t declare the renderers. It only declares a RenderKitFactory, under which I don’t directly find anything of interest.

Pointers?

  • 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-05-19T02:17:39+00:00Added an answer on May 19, 2026 at 2:17 am

    Your initial <renderer> declaration looks fine, so I tried it here.

    package com.myapp;
    
    import java.io.IOException;
    
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    
    import com.sun.faces.renderkit.html_basic.CheckboxRenderer;
    
    public class CustomCheckboxRenderer extends CheckboxRenderer {
    
        public CustomCheckboxRenderer() {
            System.out.println("CustomCheckboxRenderer <init>");
        }
    
        @Override
        public void decode(FacesContext context, UIComponent component) {
            System.out.println("CustomCheckboxRenderer decode()");
            super.decode(context, component);
        }
    
        @Override
        public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
            System.out.println("CustomCheckboxRenderer encodeBegin()");
            super.encodeBegin(context, component);
        }
    
        @Override
        public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
            System.out.println("CustomCheckboxRenderer encodeEnd()");
            super.encodeEnd(context, component);
        }
    
    }
    

    It works fine. All get printed to stdout. Your problem lies somewhere else. I was using Mojarra 2.0.3 on Tomcat 7.0.5.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to override a JSP in Liferay 6.1, namely html/portlet/enterprise_admin/settings/authentication.jsp. I have created
I'm trying to override the method 'send_confirmation_instructions' as shown here: http://trackingrails.com/posts/devise-send-confirmation-mail-manually-or-delay-them with: def send_confirmation_instructions
I'm trying to create a game loop using this tutorial . I have tried
I have been trying to override the database method of the loader class (CI_Loader).
Trying to override a tostring in one of my classes. return string.Format(@ name =
im trying to override the add() but it will not compile public class AVLTree<E
I'm trying to override a method inside a jquery widget. The method can be
If I am trying to override a specific tag inside multiple classes, do I
I'm trying to override the window.confirm in ExtJS 4. The override should return either
I'm trying to override the equality (==) operator in C# to handle comparing any

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.