|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.view.ViewDeclarationLanguage
org.apache.myfaces.view.ViewDeclarationLanguageBase
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage
public class FaceletViewDeclarationLanguage
This class represents the abstraction of Facelets as a ViewDeclarationLanguage.
Field Summary | |
---|---|
static java.lang.String |
BUILDING_COMPOSITE_COMPONENT_METADATA
|
static java.lang.String |
BUILDING_VIEW_METADATA
|
static java.lang.String |
CHARACTER_ENCODING_KEY
|
static java.lang.String |
DEFAULT_CHARACTER_ENCODING
|
static long |
DEFAULT_REFRESH_PERIOD
|
static java.lang.String |
FILLED_VIEW
|
static java.lang.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 java.lang.String |
PARAM_BUFFER_SIZE
|
static java.lang.String |
PARAM_DECORATORS
|
static java.lang.String |
PARAM_ENCODING
|
static java.lang.String |
PARAM_LIBRARIES
|
static java.lang.String |
PARAM_REFRESH_PERIOD
|
static java.lang.String |
PARAM_RESOURCE_RESOLVER
|
static java.lang.String |
PARAM_SKIP_COMMENTS
|
static java.lang.String |
PARAM_VIEW_MAPPINGS
|
Constructor Summary | |
---|---|
FaceletViewDeclarationLanguage(FacesContext context)
|
Method Summary | |
---|---|
static java.lang.Class |
_javaTypeToClass(java.lang.String type)
This method is similar to shared ClassUtils.javaTypeToClass, but the default package is java.lang TODO: Move to shared project |
void |
buildView(FacesContext context,
UIViewRoot view)
|
protected java.lang.String |
calculateViewId(FacesContext context,
java.lang.String viewId)
Calculates the effective view identifier for the specified raw view identifier. |
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)
|
java.beans.BeanInfo |
getComponentMetadata(FacesContext context,
Resource componentResource)
retargetMethodExpressions(FacesContext, UIComponent) has some clues about the behavior of this method |
protected java.lang.String |
getDefaultSuffix(FacesContext context)
|
protected java.lang.String |
getRenderedViewId(FacesContext context,
java.lang.String actionId)
|
protected java.lang.String |
getResponseContentType(FacesContext context,
java.lang.String orig)
Generate the content type |
protected java.lang.String |
getResponseEncoding(FacesContext context,
java.lang.String orig)
Generate the encoding |
Resource |
getScriptComponentResource(FacesContext context,
Resource componentResource)
|
StateManagementStrategy |
getStateManagementStrategy(FacesContext context,
java.lang.String viewId)
|
ViewMetadata |
getViewMetadata(FacesContext context,
java.lang.String viewId)
|
protected void |
handleFaceletNotFound(FacesContext context,
java.lang.String viewId)
|
protected void |
handleRenderException(FacesContext context,
java.lang.Exception e)
|
protected void |
initialize(FacesContext context)
Initialize the ViewHandler during its first request. |
static boolean |
isBuildingCompositeComponentMetadata(FacesContext context)
Check if the current facelet applied is used to build composite component metadata. |
static boolean |
isBuildingViewMetadata(FacesContext context)
Check if the current facelet applied is used to build view metadata. |
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,
java.lang.String viewId)
|
void |
retargetAttachedObjects(FacesContext context,
UIComponent topLevelComponent,
java.util.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,
java.lang.String message)
Send a source not found to the client. |
Methods inherited from class org.apache.myfaces.view.ViewDeclarationLanguageBase |
---|
checkNull, createView |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CHARACTER_ENCODING_KEY
public static final long DEFAULT_REFRESH_PERIOD
public static final java.lang.String DEFAULT_CHARACTER_ENCODING
public static final java.lang.String PARAM_BUFFER_SIZE
public static final java.lang.String PARAM_DECORATORS
public static final java.lang.String PARAM_ENCODING
public static final java.lang.String PARAM_LIBRARIES
public static final java.lang.String PARAM_REFRESH_PERIOD
public static final java.lang.String PARAM_RESOURCE_RESOLVER
public static final java.lang.String PARAM_SKIP_COMMENTS
public static final java.lang.String PARAM_VIEW_MAPPINGS
public static final java.lang.String FILLED_VIEW
public static final java.lang.String BUILDING_COMPOSITE_COMPONENT_METADATA
public static final java.lang.String BUILDING_VIEW_METADATA
public static final java.lang.String MARK_INITIAL_STATE_KEY
Constructor Detail |
---|
public FaceletViewDeclarationLanguage(FacesContext context)
Method Detail |
---|
public void buildView(FacesContext context, UIViewRoot view) throws java.io.IOException
buildView
in class ViewDeclarationLanguage
java.io.IOException
public java.beans.BeanInfo getComponentMetadata(FacesContext context, Resource componentResource)
getComponentMetadata
in class ViewDeclarationLanguage
public static boolean isBuildingCompositeComponentMetadata(FacesContext context)
context
-
public static boolean isBuildingViewMetadata(FacesContext context)
context
-
public void retargetAttachedObjects(FacesContext context, UIComponent topLevelComponent, java.util.List<AttachedObjectHandler> handlerList)
retargetAttachedObjects
in class ViewDeclarationLanguage
public void retargetMethodExpressions(FacesContext context, UIComponent topLevelComponent)
retargetMethodExpressions
in class ViewDeclarationLanguage
public static java.lang.Class _javaTypeToClass(java.lang.String type) throws java.lang.ClassNotFoundException
type
-
java.lang.ClassNotFoundException
public Resource getScriptComponentResource(FacesContext context, Resource componentResource)
getScriptComponentResource
in class ViewDeclarationLanguage
public StateManagementStrategy getStateManagementStrategy(FacesContext context, java.lang.String viewId)
getStateManagementStrategy
in class ViewDeclarationLanguage
public ViewMetadata getViewMetadata(FacesContext context, java.lang.String viewId)
getViewMetadata
in class ViewDeclarationLanguage
public void renderView(FacesContext context, UIViewRoot view) throws java.io.IOException
renderView
in class ViewDeclarationLanguage
java.io.IOException
public UIViewRoot restoreView(FacesContext context, java.lang.String viewId)
restoreView
in class ViewDeclarationLanguageBase
protected java.lang.String calculateViewId(FacesContext context, java.lang.String viewId)
calculateViewId
in class ViewDeclarationLanguageBase
context
- le current FacesContextviewId
- the raw view identifier
protected Compiler createCompiler(FacesContext context)
context
- the current FacesContext
protected FaceletFactory createFaceletFactory(FacesContext context, Compiler compiler)
context
- the current FacesContextcompiler
- the compiler to be used by the factory
protected ResponseWriter createResponseWriter(FacesContext context) throws java.io.IOException, FacesException
java.io.IOException
FacesException
protected java.lang.String getDefaultSuffix(FacesContext context) throws FacesException
FacesException
protected java.lang.String getRenderedViewId(FacesContext context, java.lang.String actionId)
protected java.lang.String getResponseContentType(FacesContext context, java.lang.String orig)
context
- orig
-
protected java.lang.String getResponseEncoding(FacesContext context, java.lang.String orig)
context
- orig
-
protected void handleFaceletNotFound(FacesContext context, java.lang.String viewId) throws FacesException, java.io.IOException
FacesException
java.io.IOException
protected void handleRenderException(FacesContext context, java.lang.Exception e) throws java.io.IOException, javax.el.ELException, FacesException
java.io.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, java.lang.String message)
sendSourceNotFound
in class ViewDeclarationLanguageBase
context
- le current FacesContextmessage
- the message associated with the error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |