protected void encodeCheckbox(FacesContext context, DataTable component, boolean checked, boolean disabled, String styleClass,
                                  boolean isHeaderCheckbox) throws IOException {

        ResponseWriter writer = context.getResponseWriter();

        if (component.isNativeElements()) {
            encodeNativeCheckbox(context, component, checked, disabled);
        }
        else {
            String ariaRowLabel = component.getAriaRowLabel();
            String boxClass = getStyleClassBuilder(context)
                        .add(HTML.CHECKBOX_BOX_CLASS)
                        .add(disabled, "ui-state-disabled")
                        .add(checked, "ui-state-active")
                        .build();
            String iconClass = checked ? HTML.CHECKBOX_CHECKED_ICON_CLASS : HTML.CHECKBOX_UNCHECKED_ICON_CLASS;
            Object rowKey = isHeaderCheckbox ? "head" : component.getRowKey();

            writer.startElement("div", null);
            writer.writeAttribute("class", styleClass, "styleClass");

            writer.startElement("div", null);

            writer.writeAttribute("id", component.getClientId(context) + "_" + rowKey + "_checkbox", null);
            writer.writeAttribute("role", "checkbox", null);
            writer.writeAttribute("tabindex", disabled ? "-1" : "0", null);
            writer.writeAttribute(HTML.ARIA_LABEL, ariaRowLabel, null);
            writer.writeAttribute(HTML.ARIA_CHECKED, String.valueOf(checked), null);

            if (disabled) {
                writer.writeAttribute("aria-disabled", "true", null);
            }

            writer.writeAttribute("class", boxClass, null);

            writer.startElement("span", null);
            writer.writeAttribute("class", iconClass, null);
            writer.endElement("span");

            writer.endElement("div");
            writer.endElement("div");
        }
    }
Encodes dynamic column. Allows to override default behavior.
primefaces/src/main/java/org/primefaces/component/datatable/DataTableRenderer.java