code: protected void renderBooleanValue(final UIComponent component,
                                        final ResponseWriter writer,
                                        final String attributeName) throws IOException {
          if (component.getAttributes().get(attributeName) != null && Boolean.valueOf(component.getAttributes().get(attributeName).toString())) {
              writer.writeAttribute(attributeName, true, attributeName);
          }
      }
docs: Render boolean value if attribute is set to true.
  
  @param attributeName attribute name
  @param component     the component
  @param writer        html response writer
  @throws IOException thrown by writer