protected void encodeScript(FacesContext context, ColorPicker colorPicker, String value) throws IOException { String clientId = colorPicker.getClientId(context); WidgetBuilder wb = getWidgetBuilder(context); wb.init("ColorPicker", colorPicker.resolveWidgetVar(), clientId) .attr("mode", colorPicker.getMode()) .attr("color", value, null); encodeClientBehaviors(context, colorPicker); wb.finish(); } }
String clientId = colorPicker.getClientId(context); String inputId = clientId + "_input"; boolean isPopup = colorPicker.getMode().equals("popup"); String styleClass = colorPicker.getStyleClass(); styleClass = styleClass == null ? ColorPicker.STYLE_CLASS : ColorPicker.STYLE_CLASS + " " + styleClass;
protected void encodeScript(FacesContext context, ColorPicker colorPicker, String value) throws IOException { String clientId = colorPicker.getClientId(context); WidgetBuilder wb = getWidgetBuilder(context); wb.initWithDomReady("ColorPicker", colorPicker.resolveWidgetVar(), clientId) .attr("mode", colorPicker.getMode()) .attr("color", value, null); encodeClientBehaviors(context, colorPicker); wb.finish(); } }
/** * @see org.primefaces.component.colorpicker.ColorPickerRenderer#encodeScript(javax.faces.context.FacesContext, * org.primefaces.component.colorpicker.ColorPicker, java.lang.String) */ @Override protected void encodeScript(FacesContext context, ColorPicker colorPicker, String value) throws IOException { String clientId = colorPicker.getClientId(context); WidgetBuilder wb = getWidgetBuilder(context); wb.init("AjaxColorPicker", colorPicker.resolveWidgetVar(), clientId, "colorpicker").attr("mode", colorPicker.getMode()) .attr("color", value, null); encodeClientBehaviors(context, (ClientBehaviorHolder) colorPicker); wb.finish(); } }
String clientId = colorPicker.getClientId(context); String inputId = clientId + "_input"; boolean isPopup = colorPicker.getMode().equals("popup"); String styleClass = colorPicker.getStyleClass(); styleClass = styleClass == null ? ColorPicker.STYLE_CLASS : ColorPicker.STYLE_CLASS + " " + styleClass;