com.sun.facelets
Class FaceletContext

java.lang.Object
  extended by javax.el.ELContext
      extended by com.sun.facelets.FaceletContext

public abstract class FaceletContext
extends javax.el.ELContext

Context representative of a single request from a Facelet

Version:
$Id: FaceletContext.java,v 1.6 2006/03/29 04:10:11 jhook Exp $
Author:
Jacob Hookom

Constructor Summary
FaceletContext()
           
 
Method Summary
abstract  void extendClient(TemplateClient client)
           
abstract  String generateUniqueId(String base)
          Generate a unique ID for the passed String
abstract  Object getAttribute(String name)
          Support method which is backed by the current VariableMapper
abstract  javax.el.ExpressionFactory getExpressionFactory()
          The ExpressionFactory to use within the Facelet this context is executing upon.
abstract  FacesContext getFacesContext()
          The current FacesContext bound to this "request"
abstract  boolean includeDefinition(UIComponent parent, String name)
          This method will walk through the TemplateClient stack to resolve and apply the definition for the passed name.
abstract  void includeFacelet(UIComponent parent, String relativePath)
          Include another Facelet defined at some path, relative to the executing context, not the current Facelet (same as include directive in JSP)
abstract  void includeFacelet(UIComponent parent, URL absolutePath)
          Include another Facelet defined at some path, absolute to this ClassLoader/OS
abstract  void popClient(TemplateClient client)
          Pop the last added TemplateClient
abstract  void pushClient(TemplateClient client)
          Push the passed TemplateClient onto the stack for Definition Resolution
abstract  void setAttribute(String name, Object value)
          Support method which is backed by the current VariableMapper
abstract  void setFunctionMapper(javax.el.FunctionMapper fnMapper)
          Set the FunctionMapper to use in EL evaluation/creation
abstract  void setVariableMapper(javax.el.VariableMapper varMapper)
          Set the VariableMapper to use in EL evaluation/creation
 
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

FaceletContext

public FaceletContext()
Method Detail

getFacesContext

public abstract FacesContext getFacesContext()
The current FacesContext bound to this "request"

Returns:
cannot be null

generateUniqueId

public abstract String generateUniqueId(String base)
Generate a unique ID for the passed String

Parameters:
base -
Returns:
a unique ID given the passed base

getExpressionFactory

public abstract javax.el.ExpressionFactory getExpressionFactory()
The ExpressionFactory to use within the Facelet this context is executing upon.

Returns:
cannot be null

setVariableMapper

public abstract void setVariableMapper(javax.el.VariableMapper varMapper)
Set the VariableMapper to use in EL evaluation/creation

Parameters:
varMapper -

setFunctionMapper

public abstract void setFunctionMapper(javax.el.FunctionMapper fnMapper)
Set the FunctionMapper to use in EL evaluation/creation

Parameters:
fnMapper -

setAttribute

public abstract void setAttribute(String name,
                                  Object value)
Support method which is backed by the current VariableMapper

Parameters:
name -
value -

getAttribute

public abstract Object getAttribute(String name)
Support method which is backed by the current VariableMapper

Parameters:
name -
Returns:
an Object specified for that name

includeFacelet

public abstract void includeFacelet(UIComponent parent,
                                    String relativePath)
                             throws IOException,
                                    FaceletException,
                                    FacesException,
                                    javax.el.ELException
Include another Facelet defined at some path, relative to the executing context, not the current Facelet (same as include directive in JSP)

Parameters:
parent -
relativePath -
Throws:
IOException
FaceletException
FacesException
javax.el.ELException

includeFacelet

public abstract void includeFacelet(UIComponent parent,
                                    URL absolutePath)
                             throws IOException,
                                    FaceletException,
                                    FacesException,
                                    javax.el.ELException
Include another Facelet defined at some path, absolute to this ClassLoader/OS

Parameters:
parent -
absolutePath -
Throws:
IOException
FaceletException
FacesException
javax.el.ELException

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 void popClient(TemplateClient client)
Pop the last added TemplateClient

See Also:
TemplateClient

extendClient

public abstract void extendClient(TemplateClient client)

includeDefinition

public abstract boolean includeDefinition(UIComponent parent,
                                          String name)
                                   throws IOException,
                                          FaceletException,
                                          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:
IOException
FaceletException
FacesException
javax.el.ELException


Copyright © 2005 All Rights Reserved.