Examples of TemplateContext


Examples of org.apache.myfaces.view.facelets.TemplateContext

    }*/
   
    @Override
    public void pushCompositeComponentClient(final TemplateClient client)
    {
        TemplateContext itc = new TemplateContextImpl();
        itc.setCompositeComponentClient(new CompositeComponentTemplateManager(this._facelet, client, getPageContext()));
        _isolatedTemplateContext.add(itc);
        _currentTemplateContext++;
        _defaultVarMapper.setTemplateContext(itc);
    }
View Full Code Here

Examples of org.apache.myfaces.view.facelets.TemplateContext

    @Override
    public TemplateContext popTemplateContext()
    {
        if (_currentTemplateContext > 0)
        {
            TemplateContext itc = _isolatedTemplateContext.get(_currentTemplateContext);
            _isolatedTemplateContext.remove(_currentTemplateContext);
            _currentTemplateContext--;
            _defaultVarMapper.setTemplateContext(_isolatedTemplateContext.get(_currentTemplateContext));
            return itc;
        }
View Full Code Here

Examples of org.apache.myfaces.view.facelets.TemplateContext

                FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
                UIComponent innerCompositeComponent = fcc.getCompositeComponentFromStack();
                fcc.popCompositeComponentToStack();
                // Pop the template context, so ui:xx tags and nested composite component
                // cases could work correctly
                TemplateContext itc = actx.popTemplateContext();
                try
                {
                    handler.apply(ctx, parent);
                }
                finally
                {
                    actx.pushTemplateContext(itc);
                    fcc.pushCompositeComponentToStack(innerCompositeComponent);
                }
                return true;
               
            }
            else
            {
                checkFacetRequired(ctx, parent, name);
                return true;
            }
        }
        else
        {
            AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
            // Pop the current composite component on stack, so #{cc} references
            // can be resolved correctly, because they are relative to the page
            // that define it.
            FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
            UIComponent innerCompositeComponent = fcc.getCompositeComponentFromStack();
            fcc.popCompositeComponentToStack();
            // Pop the template context, so ui:xx tags and nested composite component
            // cases could work correctly
            TemplateContext itc = actx.popTemplateContext();
            try
            {
                for (FaceletHandler handler : _componentHandlers)
                {
                    handler.apply(ctx, parent);
View Full Code Here

Examples of org.apache.myfaces.view.facelets.TemplateContext

                FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
                UIComponent innerCompositeComponent = fcc.getCompositeComponentFromStack();
                fcc.popCompositeComponentToStack();
                // Pop the template context, so ui:xx tags and nested composite component
                // cases could work correctly
                TemplateContext itc = actx.popTemplateContext();
                try
                {
                    handler.apply(ctx, parent);
                }
                finally
                {
                    actx.pushTemplateContext(itc);
                    fcc.pushCompositeComponentToStack(innerCompositeComponent);
                }
                return true;
               
            }
            else
            {
                checkFacetRequired(ctx, parent, name);
                return true;
            }
        }
        else
        {
            AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
            // Pop the current composite component on stack, so #{cc} references
            // can be resolved correctly, because they are relative to the page
            // that define it.
            FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
            UIComponent innerCompositeComponent = fcc.getCompositeComponentFromStack();
            fcc.popCompositeComponentToStack();
            // Pop the template context, so ui:xx tags and nested composite component
            // cases could work correctly
            TemplateContext itc = actx.popTemplateContext();
            try
            {
                for (FaceletHandler handler : _componentHandlers)
                {
                    handler.apply(ctx, parent);
View Full Code Here

Examples of org.apache.myfaces.view.facelets.TemplateContext

                FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
                UIComponent innerCompositeComponent = fcc.getCompositeComponentFromStack();
                fcc.popCompositeComponentToStack();
                // Pop the template context, so ui:xx tags and nested composite component
                // cases could work correctly
                TemplateContext itc = actx.popTemplateContext();
                try
                {
                    handler.apply(ctx, parent);
                }
                finally
                {
                    actx.pushTemplateContext(itc);
                    fcc.pushCompositeComponentToStack(innerCompositeComponent);
                }
                return true;
               
            }
            else
            {
                checkFacetRequired(ctx, name);
                return true;
            }
        }
        else
        {
            AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
            // Pop the current composite component on stack, so #{cc} references
            // can be resolved correctly, because they are relative to the page
            // that define it.
            FaceletCompositionContext fcc = actx.getFaceletCompositionContext();
            UIComponent innerCompositeComponent = fcc.getCompositeComponentFromStack();
            fcc.popCompositeComponentToStack();
            // Pop the template context, so ui:xx tags and nested composite component
            // cases could work correctly
            TemplateContext itc = actx.popTemplateContext();
            try
            {
                for (FaceletHandler handler : _componentHandlers)
                {
                    handler.apply(ctx, parent);
View Full Code Here

Examples of org.apache.shindig.gadgets.templates.TemplateContext

      loadTemplateLibraries(gadget.getContext(), feature, registries, libraries);
    }

    TagRegistry registry = new CompositeTagRegistry(registries);

    TemplateContext templateContext = new TemplateContext(gadget, content.getPipelinedData());
    boolean needsFeature = executeTemplates(templateContext, content, templates, registry);

    // Check if a feature param overrides  our guess at whether the client-side
    // feature is needed.
    String clientOverride = feature.getParam(CLIENT_SUPPORT_PARAM);
View Full Code Here

Examples of org.apache.shindig.gadgets.templates.TemplateContext

    // User-defined libraries - Priority 4
    loadTemplateLibraries(gadget.getContext(), f, registries, libraries);
   
    TagRegistry registry = new CompositeTagRegistry(registries);
   
    TemplateContext templateContext = new TemplateContext(gadget, content.getPipelinedData());   
    boolean needsFeature = executeTemplates(templateContext, content, templates, registry);

    // Check if a feature param overrides  our guess at whether the client-side   
    // feature is needed.                                                 
    String clientOverride = f.getParam(CLIENT_SUPPORT_PARAM);           
View Full Code Here

Examples of org.apache.shindig.gadgets.templates.TemplateContext

    // User-defined libraries - Priority 4
    loadTemplateLibraries(gadget.getContext(), f, registries, libraries);
   
    TagRegistry registry = new CompositeTagRegistry(registries);
   
    TemplateContext templateContext = new TemplateContext(gadget, content.getPipelinedData());   
    boolean needsFeature = executeTemplates(templateContext, content, templates, registry);

    // Check if a feature param overrides  our guess at whether the client-side   
    // feature is needed.                                                 
    String clientOverride = f.getParam(CLIENT_SUPPORT_PARAM);           
View Full Code Here

Examples of org.apache.shindig.gadgets.templates.TemplateContext

  public void setUp() throws Exception {
    Injector injector = Guice.createInjector(new ParseModule(), new TemplateModule(),
        new PropertiesModule());
    parser = injector.getInstance(GadgetHtmlParser.class);
    processor = injector.getInstance(TemplateProcessor.class);
    context = new TemplateContext(new Gadget(), null);
  }
View Full Code Here

Examples of org.apache.shindig.gadgets.templates.TemplateContext

    processor = new DefaultTemplateProcessor(expressions);
    resolver = new RootELResolver();
    parser = new NekoSimplifiedHtmlParser(new ParseModule.DOMImplementationProvider().get());
    Gadget gadget = new Gadget();
    gadget.setContext(new GadgetContext());
    context = new TemplateContext(gadget, variables);
   
    addVariable("foo", new JSONObject("{ title: 'bar' }"));
  }
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.