/** Setter for common JSF xml attribute "binding". * @throws JspException */ public void setBinding(String binding) throws JspException { if (!isValueReference(binding)) { throw new IllegalArgumentException("not a valid binding: " + binding); } _binding = binding; }
public void setBinding(final String binding) throws JspException { if (!isValueReference(binding)) { throw new IllegalArgumentException(); } this.binding = binding; }
/** Setter for common JSF xml attribute "binding". */ public void setBinding(String binding) throws JspException { if (!isValueReference(binding)) { throw new IllegalArgumentException("not a valid binding: " + binding); } _binding = binding; }
/** * @deprecated since 2.0.0 */ @Deprecated public static void setSuggestMethodMethodBinding( final UIComponent component, final String value, final Class[] args) { if (value != null && UIComponentTag.isValueReference(value)) { final MethodBinding methodBinding = FacesContext.getCurrentInstance().getApplication() .createMethodBinding(value, args); ((InputSuggest) component).setSuggestMethod(methodBinding); } }
/** * @deprecated since 2.0.0 */ @Deprecated public static void setValidatorMethodBinding(final UIComponent component, final String value, final Class[] args) { if (value != null && UIComponentTag.isValueReference(value)) { final MethodBinding methodBinding = FacesContext.getCurrentInstance().getApplication() .createMethodBinding(value, args); ((EditableValueHolder) component).setValidator(methodBinding); } }
/** * @deprecated since 2.0.0 */ @Deprecated public static void setActionListenerMethodBinding( final UIComponent component, final String value, final Class[] args) { if (value != null && UIComponentTag.isValueReference(value)) { final MethodBinding methodBinding = FacesContext.getCurrentInstance().getApplication() .createMethodBinding(value, args); ((ActionSource) component).setActionListener(methodBinding); } }
/** * @deprecated since 2.0.0 */ @Deprecated public static void setTabChangeListenerMethodBinding( final UIComponent component, final String value, final Class[] args) { if (value != null && UIComponentTag.isValueReference(value)) { final MethodBinding methodBinding = FacesContext.getCurrentInstance().getApplication() .createMethodBinding(value, args); ((TabChangeSource) component).setTabChangeListener(methodBinding); } }
/** * @deprecated since 2.0.0 */ @Deprecated public static void setStateChangeListenerMethodBinding( final UIComponent component, final String value, final Class[] args) { if (value != null && UIComponentTag.isValueReference(value)) { final MethodBinding methodBinding = FacesContext.getCurrentInstance().getApplication() .createMethodBinding(value, args); ((SheetStateChangeSource) component).setStateChangeListener(methodBinding); } }
private Object getValue() { if (UIComponentTag.isValueReference(_value)) { FacesContext facesContext = FacesContext.getCurrentInstance(); ValueBinding vb = facesContext.getApplication().createValueBinding(_value); return vb.getValue(facesContext); } return _value; }
private String getName() { if (UIComponentTag.isValueReference(_name)) { FacesContext facesContext = FacesContext.getCurrentInstance(); ValueBinding vb = facesContext.getApplication().createValueBinding(_name); return (String)vb.getValue(facesContext); } return _name; }
private Object getValue() { if (UIComponentTag.isValueReference(_value)) { FacesContext facesContext = FacesContext.getCurrentInstance(); ValueBinding vb = facesContext.getApplication().createValueBinding(_value); return vb.getValue(facesContext); } return _value; }
/** * @deprecated since 2.0.0 */ @Deprecated public static String getValueFromEl(String script) { if (UIComponentTag.isValueReference(script)) { final ValueBinding valueBinding = createValueBinding(script); script = (String) valueBinding.getValue(FacesContext.getCurrentInstance()); } return script; } }
private String getName() { if (UIComponentTag.isValueReference(_name)) { FacesContext facesContext = FacesContext.getCurrentInstance(); ValueBinding vb = facesContext.getApplication().createValueBinding(_name); return (String)vb.getValue(facesContext); } return _name; }
public static void setBoolean(UIComponent component, String attributeName, String attributeValue) { if (attributeValue == null) { return; } else if (UIComponentTag.isValueReference(attributeValue)) { setValueBinding(component, attributeName, attributeValue); } else { component.getAttributes().put(attributeName, Boolean.valueOf(attributeValue)); } }
protected Converter createConverterById(String converterId) throws JspException { try { if (UIComponentTag.isValueReference(converterId)) { converterId = (String) WebAppUtil .getValueFromCreatedValueBinding(converterId); } return WebAppUtil.createConverter(converterId); } catch (Exception e) { throw new JspException(e); } }
protected Validator createValidator() throws JspException { try { if (UIComponentTag.isValueReference(validatorId)) { validatorId = (String) WebAppUtil .getValueFromCreatedValueBinding(validatorId); } return WebAppUtil.createValidator(validatorId); } catch (Exception e) { throw new JspException(e); } }
private static void setConverterTrimValue(FacesContext facesContext, StringUtilsConverter converter, String value) { if (null == value) { return; } if (UIComponentTag.isValueReference(value)) { ValueBinding vb = facesContext.getApplication().createValueBinding(value); converter.setTrim((Boolean) vb.getValue(facesContext)); } else { converter.setTrim(Boolean.valueOf(value)); } } private static void setConverterAppendEllipsesDuringInputValue(FacesContext facesContext, StringUtilsConverter converter, String value) {
private static void setConverterAppendEllipsesDuringOutputValue(FacesContext facesContext, StringUtilsConverter converter, String value) { if (null == value) { return; } if (UIComponentTag.isValueReference(value)) { ValueBinding vb = facesContext.getApplication().createValueBinding(value); converter.setAppendEllipsesDuringOutput((Boolean) vb.getValue(facesContext)); } else { converter.setAppendEllipsesDuringOutput(Boolean.valueOf(value)); } }
private static void setConverterMaxLengthValue(FacesContext facesContext, StringUtilsConverter converter, String value) { if (null == value) { return; } if (UIComponentTag.isValueReference(value)) { ValueBinding vb = facesContext.getApplication().createValueBinding(value); converter.setMaxLength((Integer) vb.getValue(facesContext)); } else { converter.setMaxLength(Integer.valueOf(value)); } } private static void setConverterTrimValue(FacesContext facesContext, StringUtilsConverter converter, String value) {
private static void setConverterTrueValue(FacesContext facesContext, BooleanConverter converter, String value) { if (value == null) { return; } if (UIComponentTag.isValueReference(value)) { ValueBinding vb = facesContext.getApplication().createValueBinding(value); converter.setTrueValue((String) vb.getValue(facesContext)); } else { converter.setTrueValue(value); } }