public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException,
            ELException
    {
        if (_template != null)
        {
            VariableMapper orig = ctx.getVariableMapper();
            AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
            actx.extendClient(this);
            if (_params != null)
            {
                VariableMapper vm = new VariableMapperWrapper(orig);
                ctx.setVariableMapper(vm);
                for (int i = 0; i < _params.length; i++)
                {
                    _params[i].apply(ctx, parent);
                }
            }

            try
            {
                ctx.includeFacelet(parent, _template.getValue(ctx));
            }
            finally
            {
                actx.popExtendedClient(this);
                ctx.setVariableMapper(orig);
            }
        }
        else
        {
            this.nextHandler.apply(ctx, parent);
        }
    }
public void apply ( FaceletContext ctx , UIComponent parent ) throws IOException , FacesException , FaceletException , ELException { if ( _template != null ) { VariableMapper orig = ctx . getVariableMapper ( ) ; AbstractFaceletContext actx = ( AbstractFaceletContext ) ctx ; actx . extendClient ( this ) ; if ( _params != null ) { VariableMapper vm = new VariableMapperWrapper ( orig ) ; ctx . setVariableMapper ( vm ) ; for ( int i = 0 ; i < _params . length ; i ++ ) { _params [ i ] . apply ( ctx , parent ) ; } } try { ctx . includeFacelet ( parent , _template . getValue ( ctx ) ) ; } finally { actx . popExtendedClient ( this ) ; ctx . setVariableMapper ( orig ) ; } } else { this . nextHandler . apply ( ctx , parent ) ; } }
/*
(non-Javadoc)

@see javax.faces.view.facelets.FaceletHandler#apply(javax.faces.view.facelets.FaceletContext,
javax.faces.component.UIComponent)