/** {@inheritDoc} */ @Override protected UIInput createInput(final PropertyDescriptor<P, E> property, final RenderContext context) { final HtmlSelectBooleanCheckbox input = new HtmlSelectBooleanCheckbox(); input.setStyleClass(context.resolveStyleClass(JsfStyleClasses.FORM_INPUT_SCHECKBOX)); return input; }
/** {@inheritDoc} */ @Override protected UIInput createInput(final PropertyDescriptor<P, E> property, final RenderContext context) { final HtmlSelectBooleanCheckbox input = new HtmlSelectBooleanCheckbox(); input.setStyleClass(context.resolveStyleClass(JsfStyleClasses.FORM_INPUT_MCHECKBOX)); return input; }
/** {@inheritDoc} */ @Override protected UIOutput getOutput(final PropertyDescriptor<?, ?> property, final RenderContext jsfContext) { Validate.notNull(property, "Property may not be null."); Validate.notNull(jsfContext, "Render context may not be null."); HtmlSelectBooleanCheckbox output; output = new HtmlSelectBooleanCheckbox(); output.setStyleClass(jsfContext.resolveStyleClass(JsfStyleClasses.TABLE_OUTPUT_CHECKBOX)); output.setReadonly(true); output.setValueExpression( "value", this.expressionFactory.createValueExpression(jsfContext.getFacesContext().getELContext(), VariableUtil.compileVariable(jsfContext.getVariable(), jsfContext.getPrefixDeque()), Object.class)); final PresentationPropertyDescriptor<?, ?> presentationProperty = property.adapt(PresentationPropertyDescriptor.class); String format = null; if (!CheckUtil.isNull(presentationProperty)) { format = presentationProperty.getFormat(); } if (!CheckUtil.isNull(format)) { final HtmlFormat htmlFormat = new HtmlFormat(); htmlFormat.setFormat(format); output.getFacets().put("format", htmlFormat); } if (property.isRelation()) { output.setConverter(new EntityNameConverter(property.getPropertyType(), this.getModelExpression())); } return output; }