org.apache.myfaces.view.facelets
Class TemplateContext

java.lang.Object
  extended by org.apache.myfaces.view.facelets.TemplateContext
Direct Known Subclasses:
TemplateContextImpl

public abstract class TemplateContext
extends java.lang.Object

This class is used to encapsulate the information required to resolve facelets templates. Composite components require to "isolate" the inner template resolution. That means, when a ui:xx tag is used, do not take into account the outer templates defined. The methods here are only used by the current implementation and the intention is not expose it as public api.

Since:
2.0.1
Version:
$Revision: 947351 $ $Date: 2010-05-22 19:19:48 -0500 (Sáb, 22 May 2010) $
Author:
Leonardo Uribe (latest modification by $Author: lu4242 $)

Constructor Summary
TemplateContext()
           
 
Method Summary
abstract  void extendClient(AbstractFacelet owner, TemplateClient client)
           
abstract  TemplateManager getCompositeComponentClient()
           
abstract  boolean includeDefinition(javax.faces.view.facelets.FaceletContext ctx, Facelet owner, javax.faces.component.UIComponent parent, java.lang.String name)
          This method will walk through the TemplateClient stack to resolve and apply the definition for the passed name.
abstract  TemplateManager popClient()
          Pop the last added pushed TemplateClient
abstract  TemplateManager popExtendedClient()
          Pop the last added extended TemplateClient
abstract  void pushClient(AbstractFacelet owner, TemplateClient client)
          Push the passed TemplateClient onto the stack for Definition Resolution
abstract  void setCompositeComponentClient(TemplateManager compositeComponentClient)
          Set the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateContext

public TemplateContext()
Method Detail

popClient

public abstract TemplateManager popClient()
Pop the last added pushed TemplateClient

See Also:
TemplateClient

pushClient

public abstract void pushClient(AbstractFacelet owner,
                                TemplateClient client)
Push the passed TemplateClient onto the stack for Definition Resolution

Parameters:
client -
See Also:
TemplateClient

popExtendedClient

public abstract TemplateManager popExtendedClient()
Pop the last added extended TemplateClient

Parameters:
client -

extendClient

public abstract void extendClient(AbstractFacelet owner,
                                  TemplateClient client)

includeDefinition

public abstract boolean includeDefinition(javax.faces.view.facelets.FaceletContext ctx,
                                          Facelet owner,
                                          javax.faces.component.UIComponent parent,
                                          java.lang.String name)
                                   throws java.io.IOException,
                                          javax.faces.view.facelets.FaceletException,
                                          javax.faces.FacesException,
                                          javax.el.ELException
This method will walk through the TemplateClient stack to resolve and apply the definition for the passed name. If it's been resolved and applied, this method will return true.

Parameters:
parent - the UIComponent to apply to
name - name or null of the definition you want to apply
Returns:
true if successfully applied, otherwise false
Throws:
java.io.IOException
javax.faces.view.facelets.FaceletException
javax.faces.FacesException
javax.el.ELException

getCompositeComponentClient

public abstract TemplateManager getCompositeComponentClient()

setCompositeComponentClient

public abstract void setCompositeComponentClient(TemplateManager compositeComponentClient)
Set the composite component TemplateManager instance, used to resolve cc:insertChildred or cc:insertFacet usages for the current template context



Copyright © 2011 The Apache Software Foundation. All Rights Reserved.