Exemple #1
0
  // Sets a property, converting it from a literal
  private void setLiteralValue(String propertyName, ValueExpression expression) {

    assert (expression.isLiteralText());

    Object value;
    ELContext context = FacesContext.getCurrentInstance().getELContext();

    try {
      value = expression.getValue(context);
    } catch (ELException ele) {
      throw new FacesException(ele);
    }

    if (ONEVENT.equals(propertyName)) {
      onevent = (String) value;
    } else if (ONERROR.equals(propertyName)) {
      onerror = (String) value;
    } else if (IMMEDIATE.equals(propertyName)) {
      immediate = (Boolean) value;
    } else if (DISABLED.equals(propertyName)) {
      disabled = (Boolean) value;
    } else if (EXECUTE.equals(propertyName)) {
      execute = toList(propertyName, expression, value);
    } else if (RENDER.equals(propertyName)) {
      render = toList(propertyName, expression, value);
    }
  }
 public boolean isDisabled() {
   return currentState == DISABLED.getStateCode();
 }