日期:2014-05-16 浏览次数:20423 次
public boolean isImmediate() { return (Boolean) getStateHelper().eval(PropertyKeys.immediate, false); } public void setImmediate(boolean immediate) { getStateHelper().put(PropertyKeys.immediate, immediate); }
/** * <p>The immediate flag.</p> */ private boolean immediate = false; private boolean immediateSet = false; public boolean isImmediate() { if (this.immediateSet) { return (this.immediate); } ValueExpression ve = getValueExpression("immediate"); if (ve != null) { try { return (Boolean.TRUE.equals(ve.getValue(getFacesContext().getELContext()))); } catch (ELException e) { throw new FacesException(e); } } else { return (this.immediate); } } public void setImmediate(boolean immediate) { // if the immediate value is changing. if (immediate != this.immediate) { this.immediate = immediate; } this.immediateSet = true; }
private Object[] values; public Object saveState(FacesContext context) { if (context == null) { throw new NullPointerException(); } if (values == null) { values = new Object[4]; } values[0] = super.saveState(context); //将间接调用到UIComponentBase.saveState方法 values[1] = emptyStringIsNull; values[2] = validateEmptyFields; values[3] = ((validators != null) ? validators.saveState(context) : null); return (values); }
public Object saveState(FacesContext context) { if (values == null) { values = new Object[14]; } values[0] = super.saveState(context); values[1] = localValueSet ? Boolean.TRUE : Boolean.FALSE; values[2] = required ? Boolean.TRUE : Boolean.FALSE; values[3] = requiredSet ? Boolean.TRUE : Boolean.FALSE; values[4] = requiredMessage; values[5] = requiredMessageSet ? Boolean.TRUE : Boolean.FALSE; values[6] = converterMessage; values[7] = converterMessageSet ? Boolean.TRUE : Boolean.FALSE; values[8] = validatorMessage; values[9] = validatorMessageSet ? Boolean.TRUE : Boolean.FALSE; values[10] = this.valid ? Boolean.TRUE : Boolean.FALSE; values[11] = immediate ? Boolean.TRUE : Boolean.FALSE; values[12] = immediateSet ? Boolean.TRUE : Boolean.FALSE; values[13] = saveAttachedState(context, validators); return (values); }