com.sun.facelets
Class FaceletViewHandler
java.lang.Object
javax.faces.application.ViewHandler
com.sun.facelets.FaceletViewHandler
public class FaceletViewHandler
- extends ViewHandler
ViewHandler implementation for Facelets
- Version:
- $Id: FaceletViewHandler.java,v 1.49.2.6 2006/03/20 07:22:00 jhook
Exp $
- Author:
- Jacob Hookom
Method Summary |
protected void |
buildView(FacesContext context,
UIViewRoot viewToRender)
|
Locale |
calculateLocale(FacesContext context)
|
String |
calculateRenderKitId(FacesContext context)
|
protected Compiler |
createCompiler()
|
protected FaceletFactory |
createFaceletFactory(Compiler c)
|
protected ResponseWriter |
createResponseWriter(FacesContext context)
|
UIViewRoot |
createView(FacesContext context,
String viewId)
|
String |
getActionURL(FacesContext context,
String viewId)
|
String |
getDefaultSuffix(FacesContext context)
|
protected String |
getRenderedViewId(FacesContext context,
String actionId)
|
String |
getResourceURL(FacesContext context,
String path)
|
protected String |
getResponseContentType(FacesContext context,
String orig)
Generate the content type |
protected String |
getResponseEncoding(FacesContext context,
String orig)
Generate the encoding |
protected ViewHandler |
getWrapped()
|
protected void |
handleFaceletNotFound(FacesContext context,
String viewId)
|
protected void |
handleRenderException(FacesContext context,
Exception e)
|
protected void |
initialize(FacesContext context)
Initialize the ViewHandler during its first request. |
protected void |
initializeCompiler(Compiler c)
|
void |
renderView(FacesContext context,
UIViewRoot viewToRender)
|
UIViewRoot |
restoreView(FacesContext context,
String viewId)
|
void |
writeState(FacesContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final Logger log
DEFAULT_REFRESH_PERIOD
public static final long DEFAULT_REFRESH_PERIOD
- See Also:
- Constant Field Values
PARAM_REFRESH_PERIOD
public static final String PARAM_REFRESH_PERIOD
- See Also:
- Constant Field Values
PARAM_REFRESH_PERIO
public static final String PARAM_REFRESH_PERIO
- Deprecated.
- Spelling error, We'll remove this in a future release.
- See Also:
- Constant Field Values
PARAM_SKIP_COMMENTS
public static final String PARAM_SKIP_COMMENTS
- See Also:
- Constant Field Values
PARAM_VIEW_MAPPINGS
public static final String PARAM_VIEW_MAPPINGS
- Context initialization parameter for defining what viewIds should be
handled by Facelets, and what should not. When left unset, all URLs will
be handled by Facelets. When set, it must be a semicolon separated list
of either extension mappings or prefix mappings. For example:
<context-param>
<param-name>facelets.VIEW_MAPPINGS</param-name>
<param-value>/demos/*; *.xhtml</param-value>
</context-param>
would use Facelets for processing all viewIds in the "/demos" directory
or that end in .xhtml, and use the standard JSP engine for all other
viewIds.
NOTE: when using this parameter, you need to use
prefix-mapping for the FacesServlet
(that is,
/faces/*
, not *.jsf
).
- See Also:
- Constant Field Values
PARAM_LIBRARIES
public static final String PARAM_LIBRARIES
- See Also:
- Constant Field Values
PARAM_DECORATORS
public static final String PARAM_DECORATORS
- See Also:
- Constant Field Values
PARAM_DEVELOPMENT
public static final String PARAM_DEVELOPMENT
- See Also:
- Constant Field Values
PARAM_RESOURCE_RESOLVER
public static final String PARAM_RESOURCE_RESOLVER
- See Also:
- Constant Field Values
PARAM_BUILD_BEFORE_RESTORE
public static final String PARAM_BUILD_BEFORE_RESTORE
- See Also:
- Constant Field Values
PARAM_BUFFER_SIZE
public static final String PARAM_BUFFER_SIZE
- See Also:
- Constant Field Values
FaceletViewHandler
public FaceletViewHandler(ViewHandler parent)
initialize
protected void initialize(FacesContext context)
- Initialize the ViewHandler during its first request.
createFaceletFactory
protected FaceletFactory createFaceletFactory(Compiler c)
createCompiler
protected Compiler createCompiler()
initializeCompiler
protected void initializeCompiler(Compiler c)
restoreView
public UIViewRoot restoreView(FacesContext context,
String viewId)
- Specified by:
restoreView
in class ViewHandler
getWrapped
protected ViewHandler getWrapped()
createResponseWriter
protected ResponseWriter createResponseWriter(FacesContext context)
throws IOException,
FacesException
- Throws:
IOException
FacesException
getResponseEncoding
protected String getResponseEncoding(FacesContext context,
String orig)
- Generate the encoding
- Parameters:
context
- orig
-
- Returns:
getResponseContentType
protected String getResponseContentType(FacesContext context,
String orig)
- Generate the content type
- Parameters:
context
- orig
-
- Returns:
buildView
protected void buildView(FacesContext context,
UIViewRoot viewToRender)
throws IOException,
FacesException
- Throws:
IOException
FacesException
renderView
public void renderView(FacesContext context,
UIViewRoot viewToRender)
throws IOException,
FacesException
- Specified by:
renderView
in class ViewHandler
- Throws:
IOException
FacesException
handleRenderException
protected void handleRenderException(FacesContext context,
Exception e)
throws IOException,
javax.el.ELException,
FacesException
- Throws:
IOException
javax.el.ELException
FacesException
handleFaceletNotFound
protected void handleFaceletNotFound(FacesContext context,
String viewId)
throws FacesException,
IOException
- Throws:
FacesException
IOException
getDefaultSuffix
public String getDefaultSuffix(FacesContext context)
throws FacesException
- Throws:
FacesException
getRenderedViewId
protected String getRenderedViewId(FacesContext context,
String actionId)
writeState
public void writeState(FacesContext context)
throws IOException
- Specified by:
writeState
in class ViewHandler
- Throws:
IOException
calculateLocale
public Locale calculateLocale(FacesContext context)
- Specified by:
calculateLocale
in class ViewHandler
calculateRenderKitId
public String calculateRenderKitId(FacesContext context)
- Specified by:
calculateRenderKitId
in class ViewHandler
createView
public UIViewRoot createView(FacesContext context,
String viewId)
- Specified by:
createView
in class ViewHandler
getActionURL
public String getActionURL(FacesContext context,
String viewId)
- Specified by:
getActionURL
in class ViewHandler
getResourceURL
public String getResourceURL(FacesContext context,
String path)
- Specified by:
getResourceURL
in class ViewHandler
Copyright © 2005 All Rights Reserved.