| com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl
ViewHandlerImpl | public class ViewHandlerImpl extends ViewHandler implements PhaseListener(Code) | | ViewHandler implementation that allows events to be triggered upon the
occurrence of specific ViewHandler method calls. This implementation also
posts relevant lifecycle events to initialized page beans, so it also
implements PhaseListener .
|
Field Summary | |
final public static String | CACHED_EXCEPTIONS Request attribute key under which a List of any
Exception s thrown by a page bean event handler,
and then logged and swallowed, will be cached. | final public static String | CREATED_VIEW The UIViewRoot attribute under which we store
Boolean.TRUE when createView() is
called. | final public static String | PAGE_BEANS_CREATED Request attribute key under which a List of the
AbstractPageBean s that have been created for the current
request are stored. |
CACHED_EXCEPTIONS | final public static String CACHED_EXCEPTIONS(Code) | | Request attribute key under which a List of any
Exception s thrown by a page bean event handler,
and then logged and swallowed, will be cached. Application
logic can check for such exceptions (perhaps during the
destroy() method), to invoke application specific
error processing.
|
CREATED_VIEW | final public static String CREATED_VIEW(Code) | | The UIViewRoot attribute under which we store
Boolean.TRUE when createView() is
called. This can be used by the isPostBack()
method to determine whether this view was restored (no such
attribute present) and a postback is happening, or whether
this view was created (no postback is happening).
|
PAGE_BEANS_CREATED | final public static String PAGE_BEANS_CREATED(Code) | | Request attribute key under which a List of the
AbstractPageBean s that have been created for the current
request are stored. Typically, there will be either one or two
page beans on this list, depending on whether page navigation has
taken place or not, but will be more if/when static or dynamic
includes are used.
|
ViewHandlerImpl | public ViewHandlerImpl(ViewHandler handler)(Code) | | Construct a new
ViewHandlerImpl that delegates to the
specified ViewHandler instance.
Parameters: handler - The ViewHandler instance to which we will delegate |
afterPhase | public void afterPhase(PhaseEvent event)(Code) | | Process the specified after phase event.
Parameters: event - PhaseEvent to be processed |
beforePhase | public void beforePhase(PhaseEvent event)(Code) | | Process the specified before phase event.
Parameters: event - PhaseEvent to be processed |
cache | public static void cache(FacesContext context, Exception exception)(Code) | | Cache the specified exception in a request scope attribute
that application logic can use to invoke error processing.
All such cached exceptions will be available in the List
used to maintain the cache.
Parameters: context - FacesContext for the current request Parameters: exception - Exception to be cached |
calculateLocale | public Locale calculateLocale(FacesContext context)(Code) | | Return an appropriate Locale to use for this
and subsequent requests for the current client.
Parameters: context - FacesContext for the current request exception: NullPointerException - if context is null |
calculateRenderKitId | public String calculateRenderKitId(FacesContext context)(Code) | | Return an appropriate RenderKit identifier
for this and subsequent requests from the current
client.
Parameters: context - FacesContext for the current request exception: NullPointerException - if context is null |
createView | public UIViewRoot createView(FacesContext context, String viewId)(Code) | | Create and return a new UIViewRoot instance
initialized with information from this FacesContext
for the specified viewId .
Parameters: context - FacesContext for the current request Parameters: viewId - View identifier of the view to be created exception: NullPointerException - if context or viewId is null |
getActionURL | public String getActionURL(FacesContext context, String viewId)(Code) | | Return a URL suitable for rendering that selects the
specified view identifier.
Parameters: context - FacesContext for the current request Parameters: viewId - View identifier of the desired view exception: NullPointerException - if context or viewId is null |
getPhaseId | public PhaseId getPhaseId()(Code) | | Return PhaseId.ANY_PHASE because we are interested
in all phase events.
|
getResourceURL | public String getResourceURL(FacesContext context, String path)(Code) | | Return a URL suitable for rendering that selects the
specified resource.
Parameters: context - FacesContext for the current request Parameters: path - Context-relative resource path to reference exception: NullPointerException - if context or path is null |
record | public static void record(FacesContext context, AbstractPageBean bean)(Code) | | Record the specified
AbstractPageBean on the list of
page beans that have been , and therefore need to have their
beforePhase() and afterPhase() methods called at appropriate times.
Parameters: context - FacesContext for this request Parameters: bean - Page bean to be added to the list |
renderView | public void renderView(FacesContext context, UIViewRoot viewRoot) throws IOException, FacesException(Code) | | Perform the necessary actions to render the specified view
as part of the current response.
Parameters: context - FacesContext for the current request Parameters: viewRoot - View to be rendered exception: NullPointerException - if context or viewRoot is null |
restoreView | public UIViewRoot restoreView(FacesContext context, String viewId)(Code) | | Perform necessary actions to restore the specified view
and return a corresponding UIViewRoot . If there
is no view information to be restored, return null .
Parameters: context - FacesContext for the current request Parameters: viewId - View identifier of the view to be restored exception: NullPointerException - if context or viewId is null |
writeState | public void writeState(FacesContext context) throws IOException(Code) | | Take appropriate action to save the current state information.
Parameters: context - FacesContext for the current request exception: IOException - if an input/output error occurs exception: NullPointerException - if context is null |
|
|