|
||||||||||
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.shared_impl.view.ViewDeclarationLanguageBase
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage
public class FaceletViewDeclarationLanguage
This class represents the abstraction of Facelets as a ViewDeclarationLanguage.
Field Summary | |
---|---|
static String |
BUILDING_VIEW_METADATA
|
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 |
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
|
static String |
PARAM_DECORATORS
|
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
|
static String |
PARAM_REFRESH_PERIOD
|
static String |
PARAM_RESOURCE_RESOLVER
|
static String |
PARAM_SKIP_COMMENTS
|
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 Summary | |
---|---|
FaceletViewDeclarationLanguage(FacesContext context)
|
Method Summary | |
---|---|
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)
Calculates the effective view identifier for the specified raw view identifier. |
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)
Process the specification required algorithm that is generic to all PDL. |
BeanInfo |
getComponentMetadata(FacesContext context,
Resource componentResource)
retargetMethodExpressions(FacesContext, UIComponent) has some clues about the behavior of this method |
protected String |
getDefaultSuffix(FacesContext context)
|
protected String |
getRenderedViewId(FacesContext context,
String actionId)
|
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)
Send a source not found to the client. |
Methods inherited from class org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase |
---|
checkNull |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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") public static final String PARAM_BUFFER_SIZE
@JSFWebConfigParam(since="2.0") public static final String PARAM_DECORATORS
public static final String PARAM_ENCODING
@JSFWebConfigParam(since="2.0") public static final String PARAM_LIBRARIES
@JSFWebConfigParam(since="2.0") public static final String PARAM_REFRESH_PERIOD
@JSFWebConfigParam(since="2.0") public static final String PARAM_RESOURCE_RESOLVER
@JSFWebConfigParam(since="2.0") 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 CLEAN_TRANSIENT_BUILD_ON_RESTORE
Constructor Detail |
---|
public FaceletViewDeclarationLanguage(FacesContext context)
Method Detail |
---|
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
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 IOException, FacesException
IOException
FacesException
protected String getDefaultSuffix(FacesContext context) throws FacesException
FacesException
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
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 |