Examples of TemplateContext


Examples of org.ajax4jsf.renderkit.compiler.TemplateContext

      template = getTemplate(base, resourceContext);
    } catch (IOException e) {
      return null;
    }
    UIComponent component = (UIComponent) (data instanceof UIComponent ? data:null);
    TemplateContext templateContext = new TemplateContext(null,context,component);
    Object value = template.getValue(templateContext);
    if(null == value){
      int hashCode = SkinFactory.getInstance().getSkin(context).hashCode(context);
      value = ByteBuffer.allocate(4).putInt(hashCode).array();
    }
View Full Code Here

Examples of org.ajax4jsf.renderkit.compiler.TemplateContext

        source = getResource(PanelMenuIconDisc.class.getName()).getUri(context, topLevel);
      } else if (iconType.equals("grid")) {
        source = getResource(PanelMenuIconGrid.class.getName()).getUri(context, topLevel);
      } else {
        //TODO by nick - dima - TemplateContext is deprecated and shouldn't be used
        source = (String)getUtils().encodeResourceURL(new  TemplateContext(this,context,component),iconType);
      }
    }
    return source;
  }
View Full Code Here

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

            }
            DefineHandler handler = (DefineHandler) this._handlers.get(name);
            if (handler != null)
            {
                AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
                TemplateContext itc = actx.popTemplateContext();
                try
                {
                    handler.applyDefinition(ctx, parent);
                }
                finally
                {
                    actx.pushTemplateContext(itc);
                }
                return true;
            }
            else
            {
                return false;
            }
        }
        else
        {
            AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
            TemplateContext itc = actx.popTemplateContext();
            try
            {
                this.nextHandler.apply(ctx, parent);
            }
            finally
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

    }*/
   
    @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

    }*/
   
    @Override
    public void pushCompositeComponentClient(final TemplateClient client)
    {
        TemplateContext itc = new TemplateContextImpl();
        itc.setCompositeComponentClient(new CompositeComponentTemplateManager(this._facelet, client));
        _isolatedTemplateContext.add(itc);
        _currentTemplateContext++;
    }
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.