public override ValueReference GetValueReference(Bindings bindings, ELContext context) { ValueExpression expression = bindings.GetVariable(index); if (expression != null) { return(expression.GetValueReference(context)); } return(new ValueReference(null, name)); }
public override void SetValue(Bindings bindings, ELContext context, object value) { ValueExpression expression = bindings.GetVariable(index); if (expression != null) { expression.SetValue(context, value); return; } context.PropertyResolved = false; context.ELResolver.SetValue(context, null, name, value); if (!context.PropertyResolved) { throw new PropertyNotFoundException(LocalMessages.Get("error.identifier.property.notfound", name)); } }
public override object Eval(Bindings bindings, ELContext context) { ValueExpression expression = bindings.GetVariable(index); if (expression != null) { return(expression.GetValue(context)); } context.PropertyResolved = false; object result = context.ELResolver.GetValue(context, null, name); if (!context.PropertyResolved) { throw new PropertyNotFoundException(LocalMessages.Get(string.Format("error.identifier.property.notfound:{0}", name))); } return(result); }
public override bool IsReadOnly(Bindings bindings, ELContext context) { ValueExpression expression = bindings.GetVariable(index); if (expression != null) { return(expression.IsReadOnly(context)); } context.PropertyResolved = false; bool result = context.ELResolver.IsReadOnly(context, null, name); if (!context.PropertyResolved) { throw new PropertyNotFoundException(LocalMessages.Get("error.identifier.property.notfound", name)); } return(result); }