public class FaceletViewDeclarationLanguage extends ViewDeclarationLanguageBase
Modifier and Type | Field and Description |
---|---|
static String |
BUILDING_VIEW_METADATA |
static String |
CACHED_COMPONENT_IDS
Key used to cache component ids for the counter
|
static String |
CHARACTER_ENCODING_KEY |
static String |
CLEAN_TRANSIENT_BUILD_ON_RESTORE |
static String |
DEFAULT_CHARACTER_ENCODING |
static long |
DEFAULT_REFRESH_PERIOD |
static long |
DEFAULT_REFRESH_PERIOD_PRODUCTION |
static String |
FILLED_VIEW |
static String |
IS_BUILDING_INITIAL_STATE_KEY_ALIAS |
static String |
MARK_INITIAL_STATE_KEY
Marker to indicate tag handlers the view currently being built is using
partial state saving and it is necessary to call UIComponent.markInitialState
after component instances are populated.
|
static String |
PARAM_BUFFER_SIZE
Define the default buffer size value passed to ExternalContext.setResponseBufferResponse() and in a
servlet environment to HttpServletResponse.setBufferSize().
|
static String |
PARAM_DECORATORS
Set of class names, separated by ';', implementing TagDecorator interface, used to transform
a view definition in a facelet abstract syntax tree, that is used later to generate a component tree.
|
static String |
PARAM_ENCODING
Constant used by EncodingHandler to indicate the current encoding of the page being built,
and indicate which one is the response encoding on getResponseEncoding(FacesContext, String) method.
|
static String |
PARAM_LIBRARIES
Set of .taglib.xml files, separated by ';' that should be loaded by facelet engine.
|
static String |
PARAM_REFRESH_PERIOD
Define the period used to refresh the facelet abstract syntax tree from the view definition file.
|
static String |
PARAM_RESOURCE_RESOLVER
Class implementing ResourceResolver interface used to locate facelet resources.
|
static String |
PARAM_SKIP_COMMENTS
Skip comments found on a facelet file.
|
static String |
REFRESH_TRANSIENT_BUILD_ON_PSS |
static String |
REFRESHING_TRANSIENT_BUILD |
static String |
REMOVING_COMPONENTS_BUILD |
static String |
USING_PSS_ON_THIS_VIEW |
Constructor and Description |
---|
FaceletViewDeclarationLanguage(FacesContext context) |
Modifier and Type | Method and Description |
---|---|
static Class |
_javaTypeToClass(String type)
This method is similar to shared ClassUtils.javaTypeToClass,
but the default package is java.lang
TODO: Move to shared project
|
static void |
_publishPostBuildComponentTreeOnRestoreViewEvent(FacesContext context,
UIComponent component) |
void |
buildView(FacesContext context,
UIViewRoot view) |
protected String |
calculateViewId(FacesContext context,
String viewId) |
static void |
cleanTransientBuildOnRestore(FacesContext context) |
protected Compiler |
createCompiler(FacesContext context)
Creates the Facelet page compiler.
|
protected FaceletFactory |
createFaceletFactory(FacesContext context,
Compiler compiler)
Creates a FaceletFactory instance using the specified compiler.
|
protected ResponseWriter |
createResponseWriter(FacesContext context) |
UIViewRoot |
createView(FacesContext context,
String viewId) |
BeanInfo |
getComponentMetadata(FacesContext context,
Resource componentResource)
retargetMethodExpressions(FacesContext, UIComponent) has some clues about the behavior of this method
|
protected String |
getDefaultSuffix(FacesContext context)
Deprecated.
this code is not used anymore
|
protected String |
getRenderedViewId(FacesContext context,
String actionId)
Deprecated.
|
protected String |
getResponseContentType(FacesContext context,
String orig)
Generate the content type
|
protected String |
getResponseEncoding(FacesContext context,
String orig)
Generate the encoding
|
Resource |
getScriptComponentResource(FacesContext context,
Resource componentResource) |
StateManagementStrategy |
getStateManagementStrategy(FacesContext context,
String viewId) |
ViewMetadata |
getViewMetadata(FacesContext context,
String viewId) |
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.
|
static boolean |
isBuildingViewMetadata(FacesContext context)
Check if the current facelet applied is used to build view metadata.
|
static boolean |
isCleanTransientBuildOnRestore(FacesContext context) |
static boolean |
isMarkInitialState(FacesContext context) |
static boolean |
isRefreshingTransientBuild(FacesContext context) |
static boolean |
isRefreshTransientBuildOnPSS(FacesContext context) |
static boolean |
isRefreshTransientBuildOnPSSAuto(FacesContext context) |
static boolean |
isRemovingComponentBuild(FacesContext context) |
static boolean |
isUsingPSSOnThisView(FacesContext context) |
protected void |
loadDecorators(FacesContext context,
Compiler compiler)
Load the various decorators for Facelets.
|
protected void |
loadLibraries(FacesContext context,
Compiler compiler)
Load the various tag libraries for Facelets.
|
protected void |
loadOptions(FacesContext context,
Compiler compiler)
Load the various options for Facelets compiler.
|
void |
renderView(FacesContext context,
UIViewRoot view) |
UIViewRoot |
restoreView(FacesContext context,
String viewId) |
void |
retargetAttachedObjects(FacesContext context,
UIComponent topLevelComponent,
List<AttachedObjectHandler> handlerList)
In short words, this method take care of "target" an "attached object".
|
void |
retargetMethodExpressions(FacesContext context,
UIComponent topLevelComponent) |
protected void |
sendSourceNotFound(FacesContext context,
String message) |
checkNull
public static final String CHARACTER_ENCODING_KEY
public static final long DEFAULT_REFRESH_PERIOD
public static final long DEFAULT_REFRESH_PERIOD_PRODUCTION
public static final String DEFAULT_CHARACTER_ENCODING
@JSFWebConfigParam(since="2.0", alias="facelets.BUFFER_SIZE", classType="java.lang.Integer", tags="performance", desc="Define the default buffer size value passed to ExternalContext.setResponseBufferResponse() and in a servlet environment to HttpServletResponse.setBufferSize()") public static final String PARAM_BUFFER_SIZE
@JSFWebConfigParam(since="2.0", alias="facelets.DECORATORS") public static final String PARAM_DECORATORS
public static final String PARAM_ENCODING
@JSFWebConfigParam(since="2.0", desc="Set of .taglib.xml files, separated by \';\' that should be loaded by facelet engine.", alias="facelets.LIBRARIES") public static final String PARAM_LIBRARIES
@JSFWebConfigParam(since="2.0", defaultValue="-1", alias="facelets.REFRESH_PERIOD", classType="java.lang.Long", tags="performance") public static final String PARAM_REFRESH_PERIOD
By default is infinite (no active).
@JSFWebConfigParam(since="2.0", alias="facelets.RESOURCE_RESOLVER") public static final String PARAM_RESOURCE_RESOLVER
@JSFWebConfigParam(since="2.0", alias="facelets.SKIP_COMMENTS") public static final String PARAM_SKIP_COMMENTS
public static final String FILLED_VIEW
public static final String BUILDING_VIEW_METADATA
public static final String REFRESHING_TRANSIENT_BUILD
public static final String REFRESH_TRANSIENT_BUILD_ON_PSS
public static final String USING_PSS_ON_THIS_VIEW
public static final String REMOVING_COMPONENTS_BUILD
public static final String MARK_INITIAL_STATE_KEY
public static final String IS_BUILDING_INITIAL_STATE_KEY_ALIAS
public static final String CLEAN_TRANSIENT_BUILD_ON_RESTORE
public static final String CACHED_COMPONENT_IDS
public FaceletViewDeclarationLanguage(FacesContext context)
public void buildView(FacesContext context, UIViewRoot view) throws IOException
buildView
in class ViewDeclarationLanguage
IOException
public static void _publishPostBuildComponentTreeOnRestoreViewEvent(FacesContext context, UIComponent component)
public BeanInfo getComponentMetadata(FacesContext context, Resource componentResource)
getComponentMetadata
in class ViewDeclarationLanguage
public static boolean isBuildingViewMetadata(FacesContext context)
context
- public static boolean isRefreshingTransientBuild(FacesContext context)
public static boolean isRemovingComponentBuild(FacesContext context)
public static boolean isMarkInitialState(FacesContext context)
public static boolean isRefreshTransientBuildOnPSS(FacesContext context)
public static boolean isRefreshTransientBuildOnPSSAuto(FacesContext context)
public static boolean isCleanTransientBuildOnRestore(FacesContext context)
public static void cleanTransientBuildOnRestore(FacesContext context)
public static boolean isUsingPSSOnThisView(FacesContext context)
public void retargetAttachedObjects(FacesContext context, UIComponent topLevelComponent, List<AttachedObjectHandler> handlerList)
retargetAttachedObjects
in class ViewDeclarationLanguage
public void retargetMethodExpressions(FacesContext context, UIComponent topLevelComponent)
retargetMethodExpressions
in class ViewDeclarationLanguage
public static Class _javaTypeToClass(String type) throws ClassNotFoundException
type
- ClassNotFoundException
public Resource getScriptComponentResource(FacesContext context, Resource componentResource)
getScriptComponentResource
in class ViewDeclarationLanguage
public StateManagementStrategy getStateManagementStrategy(FacesContext context, String viewId)
getStateManagementStrategy
in class ViewDeclarationLanguage
public ViewMetadata getViewMetadata(FacesContext context, String viewId)
getViewMetadata
in class ViewDeclarationLanguage
public void renderView(FacesContext context, UIViewRoot view) throws IOException
renderView
in class ViewDeclarationLanguage
IOException
public UIViewRoot createView(FacesContext context, String viewId)
createView
in class ViewDeclarationLanguageBase
public UIViewRoot restoreView(FacesContext context, String viewId)
restoreView
in class ViewDeclarationLanguageBase
protected String calculateViewId(FacesContext context, String viewId)
calculateViewId
in class ViewDeclarationLanguageBase
protected Compiler createCompiler(FacesContext context)
context
- the current FacesContextprotected FaceletFactory createFaceletFactory(FacesContext context, Compiler compiler)
context
- the current FacesContextcompiler
- the compiler to be used by the factoryprotected ResponseWriter createResponseWriter(FacesContext context) throws IOException, FacesException
IOException
FacesException
@Deprecated protected String getDefaultSuffix(FacesContext context) throws FacesException
FacesException
@Deprecated protected String getRenderedViewId(FacesContext context, String actionId)
protected String getResponseContentType(FacesContext context, String orig)
context
- orig
- protected String getResponseEncoding(FacesContext context, String orig)
context
- orig
- protected void handleFaceletNotFound(FacesContext context, String viewId) throws FacesException, IOException
FacesException
IOException
protected void handleRenderException(FacesContext context, Exception e) throws IOException, javax.el.ELException, FacesException
IOException
javax.el.ELException
FacesException
protected void initialize(FacesContext context)
protected void loadDecorators(FacesContext context, Compiler compiler)
context
- the current FacesContextcompiler
- the page compilerprotected void loadLibraries(FacesContext context, Compiler compiler)
context
- the current FacesContextcompiler
- the page compilerprotected void loadOptions(FacesContext context, Compiler compiler)
context
- the current FacesContextcompiler
- the page compilerprotected void sendSourceNotFound(FacesContext context, String message)
sendSourceNotFound
in class ViewDeclarationLanguageBase
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.