org.apache.myfaces.view.facelets
Class AbstractFaceletContext

java.lang.Object
  extended by javax.el.ELContext
      extended by javax.faces.view.facelets.FaceletContext
          extended by org.apache.myfaces.view.facelets.AbstractFaceletContext

public abstract class AbstractFaceletContext
extends javax.faces.view.facelets.FaceletContext

This class contains methods that belongs to original FaceletContext shipped in facelets code before 2.0, but does not take part from api, so are considered implementation details. This includes methods related to template handling feature of facelets (called by ui:composition, ui:define and ui:insert). The methods here are only used by the current implementation and the intention is not expose it as public api. Aditionally, it also contains methods used by the current implementation for implement new features, like composite components and UniqueIdVendor support.

Since:
2.0
Version:
$Revision: 948614 $ $Date: 2010-05-26 17:12:29 -0500 (Wed, 26 May 2010) $
Author:
Leonardo Uribe (latest modification by $Author: lu4242 $)

Field Summary
 
Fields inherited from class javax.faces.view.facelets.FaceletContext
FACELET_CONTEXT_KEY
 
Constructor Summary
AbstractFaceletContext()
           
 
Method Summary
abstract  void applyCompositeComponent(javax.faces.component.UIComponent parent, javax.faces.application.Resource resource)
          Apply the facelet referenced by a url containing a composite component definition to the current UIComponent.
abstract  void extendClient(TemplateClient client)
           
abstract  java.util.Iterator<AjaxHandler> getAjaxHandlers()
          Return a descending iterator containing the ajax handlers to be applied to an specific component that implements ClientBehaviorHolder interface, according to the conditions specified on jsf 2.0 spec section 10.4.1.1.
abstract  FaceletCompositionContext getFaceletCompositionContext()
          Return the current FaceletCompositionContext instance from this build.
abstract  boolean includeCompositeComponentDefinition(javax.faces.component.UIComponent parent, java.lang.String name)
          This method resolve the current definition to be added by cc:insertChildren or cc:insertFacet.
abstract  boolean includeDefinition(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  boolean isBuildingCompositeComponentMetadata()
          Check if this build is for build composite component metadata
abstract  void popAjaxHandlerToStack()
           
abstract  TemplateManager popClient(TemplateClient client)
          Pop the last added pushed TemplateClient
abstract  void popCompositeComponentClient()
          Pop the current composite component template client, removing the current template context from stack.
abstract  TemplateManager popExtendedClient(TemplateClient client)
          Pop the last added extended TemplateClient
abstract  TemplateContext popTemplateContext()
          Pop the passed template context instance from stack.
abstract  void pushAjaxHandlerToStack(AjaxHandler parent)
           
abstract  void pushClient(TemplateClient client)
          Push the passed TemplateClient onto the stack for Definition Resolution
abstract  void pushCompositeComponentClient(TemplateClient client)
          Push the composite component tag handler identified by client on template context stack, triggering the creation of a new empty TemplateContext, that will be used to resolve templates used on that component later.
abstract  void pushTemplateContext(TemplateContext templateContext)
          Push the passed template context instance onto the stack, so all slots to be resolved (using includeDefinition() call) will take into account the information there.
 
Methods inherited from class javax.faces.view.facelets.FaceletContext
generateUniqueId, getAttribute, getExpressionFactory, getFacesContext, includeFacelet, includeFacelet, setAttribute, setFunctionMapper, setVariableMapper
 
Methods inherited from class javax.el.ELContext
getContext, getELResolver, getFunctionMapper, getLocale, getVariableMapper, isPropertyResolved, putContext, setLocale, setPropertyResolved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFaceletContext

public AbstractFaceletContext()
Method Detail

getFaceletCompositionContext

public abstract FaceletCompositionContext getFaceletCompositionContext()
Return the current FaceletCompositionContext instance from this build.

Returns:
the current FaceletCompositionContext instance

pushClient

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

Parameters:
client -
See Also:
TemplateClient

popClient

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

See Also:
TemplateClient

popExtendedClient

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

Parameters:
client -

extendClient

public abstract void extendClient(TemplateClient client)

includeDefinition

public abstract boolean includeDefinition(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

applyCompositeComponent

public abstract void applyCompositeComponent(javax.faces.component.UIComponent parent,
                                             javax.faces.application.Resource resource)
                                      throws java.io.IOException,
                                             javax.faces.view.facelets.FaceletException,
                                             javax.faces.FacesException,
                                             javax.el.ELException
Apply the facelet referenced by a url containing a composite component definition to the current UIComponent. In other words, apply the section composite:implementation in the facelet to the current component. We need to do this here because DefaultFacelet is the one who has and handle the current FaceletFactory instance.

Parameters:
parent -
url -
Throws:
java.io.IOException
javax.faces.view.facelets.FaceletException
javax.faces.FacesException
javax.el.ELException

getAjaxHandlers

public abstract java.util.Iterator<AjaxHandler> getAjaxHandlers()
Return a descending iterator containing the ajax handlers to be applied to an specific component that implements ClientBehaviorHolder interface, according to the conditions specified on jsf 2.0 spec section 10.4.1.1.

Since:
2.0

popAjaxHandlerToStack

public abstract void popAjaxHandlerToStack()
Since:
2.0

pushAjaxHandlerToStack

public abstract void pushAjaxHandlerToStack(AjaxHandler parent)
Since:
2.0

isBuildingCompositeComponentMetadata

public abstract boolean isBuildingCompositeComponentMetadata()
Check if this build is for build composite component metadata

Returns:
Since:
2.0

popCompositeComponentClient

public abstract void popCompositeComponentClient()
Pop the current composite component template client, removing the current template context from stack.

Since:
2.0.1

pushCompositeComponentClient

public abstract void pushCompositeComponentClient(TemplateClient client)
Push the composite component tag handler identified by client on template context stack, triggering the creation of a new empty TemplateContext, that will be used to resolve templates used on that component later.

Since:
2.0.1

pushTemplateContext

public abstract void pushTemplateContext(TemplateContext templateContext)
Push the passed template context instance onto the stack, so all slots to be resolved (using includeDefinition() call) will take into account the information there.

Since:
2.0.1

popTemplateContext

public abstract TemplateContext popTemplateContext()
Pop the passed template context instance from stack. This method is used by CompositeComponentResourceTagHandler to resolve templates according to the composite component level it is necessary.

Since:
2.0.1

includeCompositeComponentDefinition

public abstract boolean includeCompositeComponentDefinition(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 resolve the current definition to be added by cc:insertChildren or cc:insertFacet.

Throws:
java.io.IOException
javax.faces.view.facelets.FaceletException
javax.faces.FacesException
javax.el.ELException
Since:
2.0.1


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