docs: protected String renderCheckbox(FacesContext facesContext,
              UIComponent uiComponent, String value, boolean disabled, boolean checked, 
              boolean renderId, Integer itemNum) throws IOException
      {
          String clientId = uiComponent.getClientId(facesContext);
  
          String itemId = (itemNum == null)? null : clientId + 
                  facesContext.getNamingContainerSeparatorChar() + itemNum;
  
          ResponseWriter writer = facesContext.getResponseWriter();
  
          writer.startElement(HTML.INPUT_ELEM, uiComponent);
  
          if (itemId != null)
          {
              writer.writeAttribute(HTML.ID_ATTR, itemId, null);
          }
          else if (renderId) 
          {
              writer.writeAttribute(HTML.ID_ATTR, clientId, null);
          }
          writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_CHECKBOX, null);
          writer.writeAttribute(HTML.NAME_ATTR, clientId, null);
          
          if (checked)
          {
              writer.writeAttribute(HTML.CHECKED_ATTR, 
                      org.apache.myfaces.shared.renderkit.html.HTML.CHECKED_ATTR, null);
          }
          
          if (disabled)
          {
              writer.writeAttribute(HTML.DISABLED_ATTR, HTML.DISABLED_ATTR, null);
          }
  
          if ((value != null) && (value.length() > 0))
          {
              writer.writeAttribute(HTML.VALUE_ATTR, value, null);
          }
  
          Map<String, List<ClientBehavior>> behaviors = null;
          if (uiComponent instanceof UISelectBoolean)
          {
              if (uiComponent instanceof ClientBehaviorHolder)
              {
                  behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
                  
                  if (behaviors.isEmpty() && isCommonPropertiesOptimizationEnabled(facesContext))
                  {
                      long commonPropertiesMarked = CommonPropertyUtils.getCommonPropertiesMarked(uiComponent);
                      CommonPropertyUtils.renderChangeEventProperty(writer, 
                              commonPropertiesMarked, uiComponent);
                      CommonPropertyUtils.renderEventProperties(writer, 
                              commonPropertiesMarked, uiComponent);
                      CommonPropertyUtils.renderFieldEventPropertiesWithoutOnchange(writer, 
                              commonPropertiesMarked, uiComponent);
                  }
                  else
                  {
                      long commonPropertiesMarked = CommonPropertyUtils.getCommonPropertiesMarked(uiComponent);
                      HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(
                              facesContext, writer, uiComponent, behaviors);
                      if (isCommonEventsOptimizationEnabled(facesContext))
                      {
                          Long commonEventsMarked = CommonEventUtils.getCommonEventsMarked(uiComponent);
                          CommonEventUtils.renderBehaviorizedEventHandlers(facesContext, writer, 
                                  commonPropertiesMarked, commonEventsMarked, uiComponent, behaviors);
                          CommonEventUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
                              facesContext, writer, commonPropertiesMarked, commonEventsMarked, uiComponent, behaviors);
                      }
                      else
                      {
                          HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, 
                                  writer, uiComponent, behaviors);
                          HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
                                  facesContext, writer, uiComponent, behaviors);
                      }
                  }
                  HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
                          HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
              }
              else
              {
                  HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
                          HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
              }
          }
          else
          {
              if (uiComponent instanceof ClientBehaviorHolder)
              {
                  behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
                  
                  if (behaviors.isEmpty() && isCommonPropertiesOptimizationEnabled(facesContext))
                  {
                      long commonPropertiesMarked = CommonPropertyUtils.getCommonPropertiesMarked(uiComponent);
                      CommonPropertyUtils.renderChangeEventProperty(writer, 
                              commonPropertiesMarked, uiComponent);
                      CommonPropertyUtils.renderEventProperties(writer, 
                              commonPropertiesMarked, uiComponent);
                      CommonPropertyUtils.renderFieldEventPropertiesWithoutOnchange(writer, 
                              commonPropertiesMarked, uiComponent);
                  }
                  else
                  {
                      long commonPropertiesMarked = CommonPropertyUtils.getCommonPropertiesMarked(uiComponent);
                      HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(
                              facesContext, writer, uiComponent, behaviors);
                      if (isCommonEventsOptimizationEnabled(facesContext))
                      {
                          Long commonEventsMarked = CommonEventUtils.getCommonEventsMarked(uiComponent);
                          CommonEventUtils.renderBehaviorizedEventHandlers(facesContext, writer, 
                                  commonPropertiesMarked, commonEventsMarked, uiComponent, behaviors);
                          CommonEventUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
                              facesContext, writer, commonPropertiesMarked, commonEventsMarked,
                              uiComponent, behaviors);
                      }
                      else
                      {
                          HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, writer,
                                  uiComponent, behaviors);
                          HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
                                  facesContext, writer, uiComponent, behaviors);
                      }
                  }
                  HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, 
                          HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE_AND_EVENTS);
              }
              else
              {
                  HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent,
                          HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_STYLE);
              }
          }
          if (isDisabled(facesContext, uiComponent))
          {
              writer.writeAttribute(HTML.DISABLED_ATTR, Boolean.TRUE, null);
          }
          
          writer.endElement(HTML.INPUT_ELEM);
  
          return itemId;
      }