/** * Gets The initial value of this component. * * @return the new value value */ public Object getValue() { if (_value != null) { return _value; } ValueExpression expression = getValueExpression("value"); if (expression != null) { return expression.getValue(getFacesContext().getELContext()); } return null; }
/** * Gets An expression that specifies the Converter for this component. If * the expression is a static string or is a value expression which * returns a String, the String is used as an ID to look up a * registered Converter. If the value expression returns a Converter, * then that object is used. * * @return the new converter value */ public Converter getConverter() { if (_converter != null) { return _converter; } ValueExpression expression = getValueExpression("converter"); if (expression != null) { return (Converter)expression.getValue(getFacesContext().getELContext()); } return null; }
public Converter getConverter() { if (this.converter != null) { return (this.converter); } ValueExpression ve = getValueExpression("converter"); if (ve != null) { try { return ((Converter) ve.getValue(getFacesContext().getELContext())); } catch (ELException e) { throw new FacesException(e); } } else { return (null); } }
public Object getValue() { if (this.value != null) { return (this.value); } ValueExpression ve = getValueExpression("value"); if (ve != null) { try { return (ve.getValue(getFacesContext().getELContext())); } catch (ELException e) { throw new FacesException(e); } } else { return (null); } }
/** * An expression that specifies the Converter for this component. * <p> * The value can either be a static value (ID) or an EL expression. When a static id is * specified, an instance of the converter type registered with that id is used. When this * is an EL expression, the result of evaluating the expression must be an object that * implements the Converter interface. * </p> */ @JSFProperty(partialStateHolder=true) public Converter getConverter() { if (_converter != null) { return _converter; } ValueExpression expression = getValueExpression("converter"); if (expression != null) { return (Converter) expression.getValue(getFacesContext().getELContext()); } return null; }
static Converter findUIOutputConverter(FacesContext facesContext, UIOutput component) { // Attention! // This code is duplicated in jsfapi component package. // If you change something here please do the same in the other class! Converter converter = component.getConverter(); if (converter != null) return converter; //Try to find out by value expression ValueExpression expression = component.getValueExpression("value"); if (expression == null) return null; Class valueType = expression.getType(facesContext.getELContext()); if (valueType == null) return null; if (Object.class.equals(valueType)) return null; //There is no converter for Object class try { return facesContext.getApplication().createConverter(valueType); } catch (FacesException e) { log(facesContext, "No Converter for type " + valueType.getName() + " found", e); return null; } }
static Converter findUIOutputConverter(FacesContext facesContext, UIOutput component) { // Attention! // This code is duplicated in jsfapi component package. // If you change something here please do the same in the other class! Converter converter = component.getConverter(); if (converter != null) return converter; //Try to find out by value expression ValueExpression expression = component.getValueExpression("value"); if (expression == null) return null; Class valueType = expression.getType(facesContext.getELContext()); if (valueType == null) return null; if (Object.class.equals(valueType)) return null; //There is no converter for Object class try { return facesContext.getApplication().createConverter(valueType); } catch (FacesException e) { log(facesContext, "No Converter for type " + valueType.getName() + " found", e); return null; } }
ValueExpression expression = component.getValueExpression("value"); if (expression == null)
static Converter findUIOutputConverter(FacesContext facesContext, UIOutput component) { // Attention! // This code is duplicated in jsfapi component package. // If you change something here please do the same in the other class! Converter converter = component.getConverter(); if (converter != null) return converter; //Try to find out by value expression ValueExpression expression = component.getValueExpression("value"); if (expression == null) return null; Class valueType = expression.getType(facesContext.getELContext()); if (valueType == null) return null; if (Object.class.equals(valueType)) return null; //There is no converter for Object class try { return facesContext.getApplication().createConverter(valueType); } catch (FacesException e) { log(facesContext, "No Converter for type " + valueType.getName() + " found", e); return null; } }
static Converter findUIOutputConverter(FacesContext facesContext, UIOutput component) { // Attention! // This code is duplicated in jsfapi component package. // If you change something here please do the same in the other class! Converter converter = component.getConverter(); if (converter != null) return converter; //Try to find out by value expression ValueExpression expression = component.getValueExpression("value"); if (expression == null) return null; Class valueType = expression.getType(facesContext.getELContext()); if (valueType == null) return null; if (Object.class.equals(valueType)) return null; //There is no converter for Object class try { return facesContext.getApplication().createConverter(valueType); } catch (FacesException e) { log(facesContext, "No Converter for type " + valueType.getName() + " found", e); return null; } }
ValueExpression expression = component.getValueExpression("value"); if (expression == null)
ValueExpression expression = component.getValueExpression("value"); if (expression == null)