Examples of ValueExpression


Examples of javax.el.ValueExpression

    }

    private void testLocation(String configuredValue, String expectedResolvedLocationExpression) {
        String expectedResolvedLocation = "evaluated_location";
        ExpressionFactory expressionFactory = mock(ExpressionFactory.class);
        ValueExpression valueExpression = mock(ValueExpression.class);

        // given
        configure(resourceMappingLocation, (String) expectedResolvedLocationExpression);
        when(application.getExpressionFactory()).thenReturn(expressionFactory);
        when(expressionFactory.createValueExpression(elContext, expectedResolvedLocationExpression, Object.class)).thenReturn(
                valueExpression);
        when(valueExpression.getValue(elContext)).thenReturn(expectedResolvedLocation);

        // when
        String location = ServiceTracker.getService(ResourceMappingConfiguration.class).getLocation();

        // then
View Full Code Here

Examples of javax.el.ValueExpression

                expressionFactory.createValueExpression(Mockito.any(ELContext.class), Mockito.anyString(),
                        Mockito.any(Class.class))).thenAnswer(new Answer<ValueExpression>() {
            @Override
            public ValueExpression answer(InvocationOnMock invocation) throws Throwable {
                final String expression = (String) invocation.getArguments()[1];
                ValueExpression valueExpression = mock(ValueExpression.class);
                when(valueExpression.getValue(elContext)).thenReturn(expression);
                return valueExpression;
            }
        });
    }
View Full Code Here

Examples of javax.el.ValueExpression

        Map<String, Object> attributes = Maps.newTreeMap();
        Object value = new Object();
        attributes.put("value", value);
        ELContext elContext = facesEnvironment.getElContext();

        ValueExpression valueExpression = facesEnvironment.createMock(ValueExpression.class);


        UIComponent component = createMockComponent();

        expect(facesContext.getELContext()).andReturn(elContext);
        expect(component.getValueExpression("value")).andReturn(valueExpression);
        expect(valueExpression.getValue(elContext)).andReturn(null);
        expect(component.getAttributes()).andReturn(attributes);

        facesEnvironment.replay();

        // when
View Full Code Here

Examples of javax.el.ValueExpression

        Object attributeValue = new Object();
        Object valueExpressionValue = new Object();
        attributes.put("value", attributeValue);
        ELContext elContext = facesEnvironment.getElContext();

        ValueExpression valueExpression = facesEnvironment.createMock(ValueExpression.class);

        UIComponent component = createMockComponent();

        expect(facesContext.getELContext()).andReturn(elContext);
        expect(component.getValueExpression("value")).andReturn(valueExpression);
        expect(valueExpression.getValue(elContext)).andReturn(valueExpressionValue);

        facesEnvironment.replay();

        // when
        Object evaluated = RenderKitUtils.evaluateAttribute("value", component, facesContext);
View Full Code Here

Examples of nexj.core.meta.workflow.ValueExpression

    * @param expression The expression that evaluates to the transformation name to set.
    */
   public void setTransformationExpression(Object expression)
   {
      verifyNotReadOnly();
      m_transformation = new ValueExpression(expression);
   }
View Full Code Here

Examples of org.activiti.engine.impl.javax.el.ValueExpression

    }
    ValueExpression[] expressions = null;
    if (!identifiers.isEmpty()) {
      expressions = new ValueExpression[identifiers.size()];
      for (IdentifierNode node: identifiers) {
        ValueExpression expression = null;
        if (varMapper != null) {
          expression = varMapper.resolveVariable(node.getName());
        }
        expressions[node.getIndex()] = expression;
      }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.constant.ValueExpression

    if (startValue == null && endValue == null) {
      return new AlwaysTrueExpression();
    }
   
    Expression columnExpr = new VariableExpression(this.columnId);
    Expression startValueExpr = startValue != null ? new ValueExpression(startValue) : null;
    Expression endValueExpr = endValue != null ? new ValueExpression(endValue) : null;
    return buildAction(columnExpr, startValueExpr, endValueExpr);
  }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.constant.ValueExpression

  protected Expression buildRightOperand(Map filterInfo) {
    if (this.filterInfoKey == null) {
      throw new RuntimeException("FilterInfo key must be provided");
    }
    return new ValueExpression(this.filterInfoKey, filterInfo.get(this.filterInfoKey));
  }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.constant.ValueExpression

    public boolean isActive(Map filterInfo) {
      return filterInfo.get(this.filterInfoKey) != null;
    }

    public Expression buildExpression(Map filterInfo) {
      return new ValueExpression(filterInfo.get(this.filterInfoKey));
    }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.constant.ValueExpression

    public boolean isActive(Map filterInfo) {
      return true;
    }

    public Expression buildExpression(Map filterInfo) {
      return new ValueExpression(this.value);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.