示例#1
0
        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));
        }
示例#2
0
        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));
            }
        }
示例#3
0
        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("error.identifier.property.notfound", name));
            }
            return(result);
        }