Package javax.el

Examples of javax.el.ExpressionFactory.createValueExpression()


    private ValueExpression createTableVarValueExpression() {
        ExpressionFactory expressionFactory = application.getExpressionFactory();
        ELContext elContext = facesContext.getELContext();

        return expressionFactory.createValueExpression(elContext, "#{item}", String.class);
    }

    private ValueExpression createNestedTableVarValueExpression() {
        ExpressionFactory expressionFactory = application.getExpressionFactory();
        ELContext elContext = facesContext.getELContext();
View Full Code Here


    private ValueExpression createNestedTableVarValueExpression() {
        ExpressionFactory expressionFactory = application.getExpressionFactory();
        ELContext elContext = facesContext.getELContext();

        return expressionFactory.createValueExpression(elContext, "#{nestedItem}", String.class);
    }

    private void createNestedText() {
        nestedText = (UIOutput) application.createComponent(HtmlOutputText.COMPONENT_TYPE);
        nestedText.setId("nestedText");
View Full Code Here

    {
        ELContext elContext = context.getELContext();

        ExpressionFactory factory = getExpressionFactory();

        return (T) factory.createValueExpression(elContext, expression, expectedType).getValue(elContext);
    }

    @Override
    public final void addELContextListener(final ELContextListener listener)
    {
View Full Code Here

        expect(application.getViewHandler()).andReturn(viewHandler);
        expect(viewHandler.calculateLocale(facesContext)).andReturn(Locale.ENGLISH);
        expect(application.getMessageBundle()).andReturn("javax.faces.Messages");
        expect(application.getExpressionFactory()).andReturn(expressionFactory);
        String s = "xxx: Validation Error: Value is greater than allowable maximum of ''xyz''";
        expect(expressionFactory.createValueExpression(elContext,s,String.class)).andReturn(valueExpression);
        expect(valueExpression.getValue(elContext)).andReturn(s);
        mocksControl.replay();

        assertEquals(_MessageUtils.getErrorMessage(facesContext, "javax.faces.validator.DoubleRangeValidator.MAXIMUM",
                new Object[] { "xyz", "xxx" }).getDetail(),
View Full Code Here

        assert _condition != null;

        if (_conditionExpression == null)
        {
            ExpressionFactory factory = context.getApplication().getExpressionFactory();
            _conditionExpression = factory.createValueExpression(context.getELContext(), _condition, Boolean.class);
        }

        return _conditionExpression;
    }
View Full Code Here

        assert _toViewId != null;

        if (_toViewIdExpression == null)
        {
            ExpressionFactory factory = context.getApplication().getExpressionFactory();
            _toViewIdExpression = factory.createValueExpression(context.getELContext(), _toViewId, String.class);
        }

        return _toViewIdExpression;
    }
View Full Code Here

    JspApplicationContextImpl jspContext
      = JspApplicationContextImpl.getCurrent();
   
    ExpressionFactory factory = jspContext.getExpressionFactory();

    return factory.createValueExpression(elContext,
                                         exprString,
                                         type);
  }

  public static Expr createExpr(ELContext elContext,
View Full Code Here

    FacesContext context = FacesContext.getCurrentInstance();

    Application app = context.getApplication();
    ExpressionFactory factory = app.getExpressionFactory();

    _binding = factory.createValueExpression(context.getELContext(),
                                             binding,
                                             Validator.class);
  }

  public int doStartTag()
View Full Code Here

            // test it out
            ELContextImpl ctx = new ELContextImpl();
            ctx.setFunctionMapper(this.getFunctionMapper(el));
            ExpressionFactory ef = this.pageInfo.getExpressionFactory();
            try {
                ef.createValueExpression(ctx, expr, Object.class);
            } catch (ELException e) {

            }
        }
View Full Code Here

                        .doPrivileged(new PrivilegedExceptionAction() {

                            public Object run() throws Exception {
                                ELContextImpl ctx = (ELContextImpl) pageContext.getELContext();
                                ctx.setFunctionMapper(new FunctionMapperImpl(functionMap));
                                ValueExpression ve = exprFactory.createValueExpression(ctx, expression, expectedType);
                                return ve.getValue(ctx);
                            }
                        });
            } catch (PrivilegedActionException ex) {
                Exception realEx = ex.getException();
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.