Examples of ELContextImpl


Examples of com.sun.faces.el.ELContextImpl

    void publishPostConfigEvent() {

        FacesContext ctx = FacesContext.getCurrentInstance();
        Application app = ctx.getApplication();
        if (null == ((InitFacesContext)ctx).getELContext()) {
            ELContext elContext = new ELContextImpl(app.getELResolver());
            elContext.putContext(FacesContext.class, ctx);
            UIViewRoot root = ctx.getViewRoot();
            if (null != root) {
                elContext.setLocale(root.getLocale());
            }
            ELContextListener[] listeners = app.getELContextListeners();
            if (listeners.length > 0) {
                ELContextEvent event = new ELContextEvent(elContext);
                for (ELContextListener listener: listeners) {
View Full Code Here

Examples of com.sun.faces.el.ELContextImpl

                    sb.append(m).append('\n');
                }
                LOGGER.severe(sb.toString());
            }
            registerELResolverAndListenerWithJsp(context, false);
            ELContext elctx = new ELContextImpl(initContext.getApplication().getELResolver());
            elctx.putContext(FacesContext.class, initContext);
            initContext.setELContext(elctx);
            ApplicationAssociate associate =
                    ApplicationAssociate.getInstance(context);
            if (associate != null) {
                associate.setContextName(getServletContextIdentifier(context));
View Full Code Here

Examples of com.sun.faces.el.ELContextImpl

                LOGGER.log(Level.FINE,
                           "ConfigureListener.contextDestroyed({0})",
                           context.getServletContextName());
            }
           
            ELContext elctx = new ELContextImpl(initContext.getApplication().getELResolver());
            elctx.putContext(FacesContext.class, initContext);
            initContext.setELContext(elctx);
            Application app = initContext.getApplication();
            app.publishEvent(initContext,
                    PreDestroyApplicationEvent.class,
                    Application.class,
View Full Code Here

Examples of org.apache.jasper.el.ELContextImpl

    }

    // ************************************************************************

    private String evaluateExpression(String expression) {
        ELContextImpl ctx = new ELContextImpl();
        ctx.setFunctionMapper(new FMapper());
        ExpressionFactoryImpl exprFactory = new ExpressionFactoryImpl();
        ValueExpression ve = exprFactory.createValueExpression(ctx, expression,
                String.class);
        return (String) ve.getValue(ctx);
    }
View Full Code Here

Examples of org.apache.jasper.el.ELContextImpl

                                    validateFunctions(el, n);
                                    jspAttrs[i] = new Node.JspAttribute(tldAttr,
                                            attrs.getQName(i), attrs.getURI(i),
                                            attrs.getLocalName(i),
                                            attrs.getValue(i), false, el, false);
                                    ELContextImpl ctx = new ELContextImpl(
                                            expressionFactory);
                                    ctx.setFunctionMapper(getFunctionMapper(el));
                                    try {
                                        jspAttrs[i].validateEL(this.pageInfo.getExpressionFactory(), ctx);
                                    } catch (ELException e) {
                                        this.err.jspError(n.getStart(),
                                                "jsp.error.invalid.expression",
View Full Code Here

Examples of org.apache.jasper.el.ELContextImpl

                        } else {
                            result = new Node.JspAttribute(tai, qName, uri,
                                    localName, value, false, el, dynamic);
                        }

                        ELContextImpl ctx =
                                new ELContextImpl(expressionFactory);
                        ctx.setFunctionMapper(getFunctionMapper(el));

                        try {
                            result.validateEL(this.pageInfo
                                    .getExpressionFactory(), ctx);
                        } catch (ELException e) {
View Full Code Here

Examples of org.apache.jasper.el.ELContextImpl

        private void prepareExpression(ELNode.Nodes el, Node n, String expr)
                throws JasperException {
            validateFunctions(el, n);

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

Examples of org.apache.jasper.el.ELContextImpl

                retValue = AccessController
                        .doPrivileged(new PrivilegedExceptionAction<Object>() {

                            @Override
                            public Object run() throws Exception {
                                ELContextImpl ctx = (ELContextImpl) pageContext.getELContext();
                                ctx.setFunctionMapper(functionMap);
                                ValueExpression ve = exprFactory.createValueExpression(ctx, expression, expectedType);
                                return ve.getValue(ctx);
                            }
                        });
            } catch (PrivilegedActionException ex) {
                Exception realEx = ex.getException();
                if (realEx instanceof ELException) {
                    throw (ELException) realEx;
                } else {
                    throw new ELException(realEx);
                }
            }
        } else {
            ELContextImpl ctx = (ELContextImpl) pageContext.getELContext();
            ctx.setFunctionMapper(functionMap);
            ValueExpression ve = exprFactory.createValueExpression(ctx, expression, expectedType);
            retValue = ve.getValue(ctx);
        }

        return retValue;
View Full Code Here

Examples of org.apache.jasper.el.ELContextImpl

                        validateFunctions(el, n);

                        result = new Node.JspAttribute(tai, qName, uri,
                                localName, value, false, el, dynamic);

                        ELContextImpl ctx = new ELContextImpl();
                        ctx.setFunctionMapper(getFunctionMapper(el));

                        try {
                            result.validateEL(this.pageInfo
                                    .getExpressionFactory(), ctx);
                        } catch (ELException e) {
View Full Code Here

Examples of org.apache.jasper.el.ELContextImpl

        private void prepareExpression(ELNode.Nodes el, Node n, String expr)
                throws JasperException {
            validateFunctions(el, n);

            // 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
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.