class CheckBoxFieldRenderer extends FieldRenderer<CheckBoxFieldDefinition, CheckBoxFormGroup> {

    @Override
    protected FormGroup getFormGroup(RenderMode renderMode) {
        checkbox.setId(generateUniqueId());
        checkbox.setName(fieldNS);
        checkbox.setEnabled(!field.getReadOnly() && renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE));

        CheckBoxFormGroup formGroup = formGroupsInstance.get();

        formGroup.render(checkbox, field);
        
        registerFieldRendererPart(checkbox);

        return formGroup;
    }

}