Examples of VariableMapper


Examples of javax.el.VariableMapper

                CompositeComponentResourceTagHandler.addAttachedObjectHandler(
                        compositeComponentBase, it.next());
            }
        }   
       
        VariableMapper orig = faceletContext.getVariableMapper();
        try
        {
            faceletContext.setVariableMapper(new VariableMapperWrapper(orig));
           
            actx.applyCompositeComponent(compositeFacetPanel, _resource);
View Full Code Here

Examples of javax.el.VariableMapper

                    i++;
                }

                String v = this.getVarName(ctx);
                String vs = this.getVarStatusName(ctx);
                VariableMapper vars = ctx.getVariableMapper();
                ValueExpression ve = null;
                ValueExpression vO = this.capture(v, vars);
                ValueExpression vsO = this.capture(vs, vars);
                int mi = 0;
                Object value = null;
                try
                {
                    boolean first = true;
                    while (i <= e && itr.hasNext())
                    {
                        value = itr.next();

                        // set the var
                        if (v != null)
                        {
                            if (t || srcVE == null)
                            {
                                ctx.setAttribute(v, value);
                            }
                            else
                            {
                                ve = this.getVarExpr(srcVE, src, value, i);
                                vars.setVariable(v, ve);
                            }
                        }

                        // set the varStatus
                        if (vs != null)
                        {
                            IterationStatus itrS = new IterationStatus(first, !itr.hasNext(), i, sO, eO, mO, value);
                            if (t || srcVE == null)
                            {
                                ctx.setAttribute(vs, itrS);
                            }
                            else
                            {
                                ve = new IterationStatusExpression(itrS);
                                vars.setVariable(vs, ve);
                            }
                        }

                        // execute body
                        this.nextHandler.apply(ctx, parent);

                        // increment steps
                        mi = 1;
                        while (mi < m && itr.hasNext())
                        {
                            itr.next();
                            mi++;
                            i++;
                        }
                        i++;

                        first = false;
                    }
                }
                finally
                {
                    if (v != null)
                    {
                        vars.setVariable(v, vO);
                    }
                    if (vs != null)
                    {
                        vars.setVariable(vs, vsO);
                    }
                }
            }
        }
        AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
View Full Code Here

Examples of javax.el.VariableMapper

            // According to UserTagHandler, in this point we need to wrap the facelet
            // VariableMapper, so local changes are applied on "page context", but
            // data is retrieved from full context
            FaceletContext faceletContext = (FaceletContext) context.
                    getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
            VariableMapper orig = faceletContext.getVariableMapper();
            try
            {
                faceletContext.setVariableMapper(new VariableMapperWrapper(orig));

                compositeComponentBase.pushComponentToEL(context, compositeComponentBase);
View Full Code Here

Examples of javax.el.VariableMapper

                    i++;
                }

                String v = this.getVarName(ctx);
                String vs = this.getVarStatusName(ctx);
                VariableMapper vars = ctx.getVariableMapper();
                ValueExpression ve = null;
                ValueExpression vO = this.capture(v, vars);
                ValueExpression vsO = this.capture(vs, vars);
                int mi = 0;
                Object value = null;
                try
                {
                    boolean first = true;
                    while (i <= e && itr.hasNext())
                    {
                        value = itr.next();

                        // set the var
                        if (v != null)
                        {
                            if (t || srcVE == null)
                            {
                                ctx.setAttribute(v, value);
                            }
                            else
                            {
                                ve = this.getVarExpr(srcVE, src, value, i);
                                vars.setVariable(v, ve);
                            }
                        }

                        // set the varStatus
                        if (vs != null)
                        {
                            IterationStatus itrS = new IterationStatus(first, !itr.hasNext(), i, sO, eO, mO, value);
                            if (t || srcVE == null)
                            {
                                ctx.setAttribute(vs, itrS);
                            }
                            else
                            {
                                ve = new IterationStatusExpression(itrS);
                                vars.setVariable(vs, ve);
                            }
                        }

                        // execute body
                        this.nextHandler.apply(ctx, parent);

                        // increment steps
                        mi = 1;
                        while (mi < m && itr.hasNext())
                        {
                            itr.next();
                            mi++;
                            i++;
                        }
                        i++;

                        first = false;
                    }
                }
                finally
                {
                    if (v != null)
                    {
                        vars.setVariable(v, vO);
                    }
                    if (vs != null)
                    {
                        vars.setVariable(vs, vsO);
                    }
                }
            }
            fcc.endComponentUniqueIdSection();
        }
View Full Code Here

Examples of javax.el.VariableMapper

                mctx.addAttachedObjectHandler(
                        compositeComponentBase, it.next());
            }
        }   
       
        VariableMapper orig = faceletContext.getVariableMapper();
        try
        {
            faceletContext.setVariableMapper(new VariableMapperWrapper(orig));
            actx.pushCompositeComponentClient(this);
            Resource resourceForCurrentView = faceletContext.getFacesContext().getApplication().
View Full Code Here

Examples of javax.el.VariableMapper

        {
            if (path == null || path.length() == 0)
            {
                return;
            }
            VariableMapper orig = ctx.getVariableMapper();
            ctx.setVariableMapper(new VariableMapperWrapper(orig));
            try
            {
                //Only ui:param could be inside ui:include.
                //this.nextHandler.apply(ctx, null);
View Full Code Here

Examples of javax.el.VariableMapper

        CompositeComponentBeanInfo result;
        FaceletContext ctx = (FaceletContext)
                context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
        FaceletFactory factory = (FaceletFactory)
              RequestStateManager.get(context, RequestStateManager.FACELET_FACTORY);
        VariableMapper orig = ctx.getVariableMapper();

    // create tmp and facetComponent
        UIComponent tmp = context.getApplication().createComponent("javax.faces.NamingContainer");
        UIPanel facetComponent = (UIPanel)
                context.getApplication().createComponent("javax.faces.Panel");

    // PENDING I think this can be skipped because we don't render
    // this component instance.
        facetComponent.setRendererType("javax.faces.Group");

    // PENDING This could possibly be skipped too.  However, I think
    // this is important because other tag handlers, within
    // <cc:interface> expect it will be there.
        tmp.getFacets().put(UIComponent.COMPOSITE_FACET_NAME, facetComponent);
        // We have to put the resource in here just so the classes that eventually
        // get called by facelets have access to it.
        tmp.getAttributes().put(Resource.COMPONENT_RESOURCE_KEY,
                ccResource);
       
        Facelet f;

        try {
            f = factory.getFacelet(ccResource.getURL());
            VariableMapper wrapper = new VariableMapperWrapper(orig) {

                @Override
                public ValueExpression resolveVariable(String variable) {
                    return super.resolveVariable(variable);
                }
View Full Code Here

Examples of javax.el.VariableMapper

        final int iterations = 100*1000;
        long elapsed = -System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            final Map<String, ValueExpression> localContext = ProctorUtils.convertToValueExpressionMap(expressionFactory, values);
            final VariableMapper variableMapper = new MulticontextReadOnlyVariableMapper(localContext);

            final ELContext elContext = new ELContext() {
                @Override
                public ELResolver getELResolver() {
                    return elResolver;
View Full Code Here

Examples of javax.el.VariableMapper

        CompositeComponentBeanInfo result;
        FaceletContext ctx = (FaceletContext)
                context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
        FaceletFactory factory = (FaceletFactory)
              RequestStateManager.get(context, RequestStateManager.FACELET_FACTORY);
        VariableMapper orig = ctx.getVariableMapper();

    // create tmp and facetComponent
        UIComponent tmp = context.getApplication().createComponent("javax.faces.NamingContainer");
        UIPanel facetComponent = (UIPanel)
                context.getApplication().createComponent("javax.faces.Panel");

    // PENDING I think this can be skipped because we don't render
    // this component instance.
        facetComponent.setRendererType("javax.faces.Group");

    // PENDING This could possibly be skipped too.  However, I think
    // this is important because other tag handlers, within
    // <cc:interface> expect it will be there.
        tmp.getFacets().put(UIComponent.COMPOSITE_FACET_NAME, facetComponent);
        // We have to put the resource in here just so the classes that eventually
        // get called by facelets have access to it.
        tmp.getAttributes().put(Resource.COMPONENT_RESOURCE_KEY,
                ccResource);
       
        Facelet f;

        try {
            f = factory.getFacelet(ccResource.getURL());
            VariableMapper wrapper = new VariableMapperWrapper(orig) {

                @Override
                public ValueExpression resolveVariable(String variable) {
                    return super.resolveVariable(variable);
                }
View Full Code Here

Examples of javax.el.VariableMapper

        if (itemId != null) {
            if (getCurrent() == null)
                pageContext.removeAttribute(itemId, PageContext.PAGE_SCOPE);
            else if (deferredExpression != null) {
                VariableMapper vm =
                    pageContext.getELContext().getVariableMapper();
                if (vm != null) {
                    ValueExpression ve = getVarExpression(deferredExpression);
                    ValueExpression tmpValue = vm.setVariable(itemId, ve);
                    if (firstTime)
                        oldMappedValue = tmpValue;
                }
            } else
                pageContext.setAttribute(itemId, getCurrent());
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.