Package javax.el

Examples of javax.el.ValueReference


                this.jjtGetChild(2) instanceof AstMethodParameters) {
            // This is a method call
            return null;
        }
        Target t = getTarget(ctx);
        return new ValueReference(t.base, t.property);
    }
View Full Code Here


    InspectorElContext inspectorElContext = new InspectorElContext(context);
    valueExpression.getType(inspectorElContext);
    inspectorElContext.setPass(InspectorPass.PASS2_FIND_FINAL_NODE);
    valueExpression.getValue(inspectorElContext);

    return new ValueReference(inspectorElContext.getBase(), inspectorElContext.getProperty());
  }
View Full Code Here

      .ofTypes(EditableValueHolder.class)
      .invoke(new Callback.WithArgument<UIComponent>() { @Override public void invoke(UIComponent component) {

        ValueExpression valueExpression = component.getValueExpression("value");
        if (valueExpression != null) {
          ValueReference valueReference = getValueReference(context.getELContext(), valueExpression);
          if (valueReference.getBase().equals(targetBase)) {
            operation.invoke((EditableValueHolder) component, valueReference);
          }
        }
      }}
    );
View Full Code Here

     * @return A ValueReferenceWrapper with the necessary information about the ValueReference.
     */
    public static _ValueReferenceWrapper getUELValueReferenceWrapper(ValueExpression valueExpression,
                                                                     final ELContext elCtx)
    {
        ValueReference valueReference = valueExpression.getValueReference(elCtx);
       
        while (valueReference != null
                && valueReference.getBase() instanceof CompositeComponentExpressionHolder)
        {
            valueExpression = ((CompositeComponentExpressionHolder) valueReference.getBase())
                                  .getExpression((String) valueReference.getProperty());
            if(valueExpression == null)
            {
                break;
            }
            valueReference = valueExpression.getValueReference(elCtx);
        }
       
        if (valueReference != null)
        {
            return new _ValueReferenceWrapper(valueReference.getBase(), valueReference.getProperty());
        }
       
        return null;
    }
View Full Code Here

  protected AstNode getPrefix() {
    return prefix;
  }

  public ValueReference getValueReference(Bindings bindings, ELContext context) {
    return new ValueReference(prefix.eval(bindings, context), getProperty(bindings, context));
  }
View Full Code Here

  public ValueReference getValueReference(Bindings bindings, ELContext context) {
    ValueExpression expression = bindings.getVariable(index);
    if (expression != null) {
      return expression.getValueReference(context);
    }
    return new ValueReference(null, name);
  }
View Full Code Here

     * @param elCtx
     * @return A ValueReferenceWrapper with the necessary information about the ValueReference.
     */
    public static _ValueReferenceWrapper getUELValueReferenceWrapper(ValueExpression valueExpression, final ELContext elCtx)
    {
        ValueReference valueReference = valueExpression.getValueReference(elCtx);
       
        while (valueReference != null
                && valueReference.getBase() instanceof CompositeComponentExpressionHolder)
        {
            valueExpression = ((CompositeComponentExpressionHolder) valueReference.getBase())
                                  .getExpression((String) valueReference.getProperty());
            if(valueExpression == null)
            {
                break;
            }
            valueReference = valueExpression.getValueReference(elCtx);
        }
       
        if (valueReference != null)
        {
            return new _ValueReferenceWrapper(valueReference.getBase(), valueReference.getProperty());
        }
       
        return null;
    }
View Full Code Here

                this.jjtGetChild(2) instanceof AstMethodParameters) {
            // This is a method call
            return null;
        }
        Target t = getTarget(ctx);
        return new ValueReference(t.base, t.property);
    }
View Full Code Here

    @Override
    public ValueReference getValueReference(ELContext context) {
        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
                this.varMapper);
        context.notifyBeforeEvaluation(getExpressionString());
        ValueReference result = this.getNode().getValueReference(ctx);
        context.notifyAfterEvaluation(getExpressionString());
        return result;
    }
View Full Code Here

        // First check the basics work
        String result = (String) ve.getValue(context);
        assertEquals("Tomcat", result);

        // Now check the value reference
        ValueReference vr = ve.getValueReference(context);
        assertNotNull(vr);

        assertEquals(beanB, vr.getBase());
        assertEquals("name", vr.getProperty());
    }
View Full Code Here

TOP

Related Classes of javax.el.ValueReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.