Deprecated
This is the default implementation for JSF 1.2.
While this class isn't used by the 2.0 runtime, it's kept for binary compatibility with those that extend from this class directly.
| Modifier and Type | Class and Description |
|---|---|
| private static class | ViewHandlerImpl.WriteBehindStateWriter
Thanks to the Facelets folks for some of the concepts incorporated into this class. |
| Modifier and Type | Field and Description |
|---|---|
| private ApplicationAssociate | |
| private int | |
| private String[] | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Locale | calculateLocale(FacesContext
FacesContext for the current requestImplements abstract javax.
Returns an appropriate |
| public String | calculateRenderKitId(FacesContext
FacesContext for the current requestImplements abstract javax.
Return an appropriate |
| private String | Returns: the view ID with an altered suffix mapping (if necessary)current context, String FacesContextincoming view ID viewId)
Adjust the viewID per the requirements of |
| public UIViewRoot | createView(FacesContext
the Faces context. context, String the view id. viewId)Implements abstract javax.
Create and return a new |
| private void | doRenderView(FacesContext
the context, UIViewRoot FacesContext for the current requestthe view to render viewToRender)This is a separate method to account for handling the content after the view tag. |
| private boolean | Returns: true if the response should be immediately flushed to the client,
otherwise falsethe context, UIViewRoot FacesContext for the current requestthe view to build viewToExecute)Execute the target view. |
| protected Locale | Returns: the Locale based on pref and the matching alogritm specified in JSTL 8.3.2the context, Locale FacesContext for the current requestthe preferred locale pref)Attempts to find a matching locale based on |
| public String | getActionURL(FacesContext
FacesContext for this requestView identifier of the desired view viewId)Implements abstract javax.
If the value returned from this method is used as
the |
| private ApplicationAssociate | |
| public String | getResourceURL(FacesContext
FacesContext for the current requestResource path to convert to a URL path)Implements abstract javax.
If the value returned from this method is used as the |
| public String | getWebsocketURL(FacesContext
FacesContext for the current request.The channel name of the websocket. channel)Implements abstract javax.
If the value returned from this method is used as the |
| private static ViewHandlerResponseWrapper | |
| public void | initView(FacesContext
the Faces context. context)Overrides javax. ViewHandler#initView(javax.faces.context.FacesContext) if the
javax.faces.context.ExternalContext#getRequestCharacterEncoding() returns a
non-null result.
|
| private String | Returns: the URI without additional FacesServlet mappingsthe servlet request path uri, String the FacesServlet mapping used for this request mapping)
if the specified mapping is a prefix mapping, and the provided request URI (usually the value
from |
| public void | renderView(FacesContext
FacesContext for the current requestthe view to render viewToRender)Implements abstract javax.
Perform whatever actions are required to render the
response view to the response object associated with the current |
| public UIViewRoot | restoreView(FacesContext
FacesContext for the current requestthe view identifier for the current request viewId)Implements abstract javax.
Perform whatever actions are required to restore
the view associated with the specified |
| private void | |
| public void | writeState(FacesContext
FacesContext for the current requestImplements abstract javax.
Take any appropriate action to either immediately write out the current state information (by
calling |
| associate | back to summary |
|---|---|
| private ApplicationAssociate associate | |
| bufSize | back to summary |
|---|---|
| private int bufSize | |
| configuredExtensions | back to summary |
|---|---|
| private String[] configuredExtensions | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| ViewHandlerImpl | back to summary |
|---|---|
| public ViewHandlerImpl() | |
| calculateLocale | back to summary |
|---|---|
| public Locale calculateLocale(FacesContext context) Implements abstract javax. Doc from javax.
Returns an appropriate
| |
| calculateRenderKitId | back to summary |
|---|---|
| public String calculateRenderKitId(FacesContext context) Implements abstract javax. Doc from javax.
Return an appropriate
The default return value is
| |
| convertViewId | back to summary |
|---|---|
| private String convertViewId(FacesContext context, String viewId)
Adjust the viewID per the requirements of
| |
| createView | back to summary |
|---|---|
| public UIViewRoot createView(FacesContext context, String viewId) Implements abstract javax. Doc from javax.
Create and return a new
| |
| doRenderView | back to summary |
|---|---|
| private void doRenderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException This is a separate method to account for handling the content after the view tag. Create a new ResponseWriter around this response's Writer. Set it into the FacesContext, saving the old one aside.
call encodeBegin(), encodeChildren(), encodeEnd() on the argument Restore the old ResponseWriter into the FacesContext. Write out the after view content to the response's writer. Flush the response buffer, and remove the after view content from the request scope.
| |
| executePageToBuildView | back to summary |
|---|---|
| private boolean executePageToBuildView(FacesContext context, UIViewRoot viewToExecute) throws IOException Execute the target view. If the HTTP status code range is not 2xx, then return true to indicate the response should be immediately flushed by the caller so that conditions such as 404 are properly handled.
| |
| findMatch | back to summary |
|---|---|
| protected Locale findMatch(FacesContext context, Locale pref) Attempts to find a matching locale based on
| |
| getActionURL | back to summary |
|---|---|
| public String getActionURL(FacesContext context, String viewId) Implements abstract javax. Doc from javax.
If the value returned from this method is used as
the
| |
| getAssociate | back to summary |
|---|---|
| private ApplicationAssociate getAssociate(FacesContext context) | |
| getResourceURL | back to summary |
|---|---|
| public String getResourceURL(FacesContext context, String path) Implements abstract javax. Doc from javax.
If the value returned from this method is used as the
| |
| getWebsocketURL | back to summary |
|---|---|
| public String getWebsocketURL(FacesContext context, String channel) Implements abstract javax. Doc from javax.
If the value returned from this method is used as the
| |
| getWrapper | back to summary |
|---|---|
| private static ViewHandlerResponseWrapper getWrapper(ExternalContext extContext) | |
| initView | back to summary |
|---|---|
| public void initView(FacesContext context) throws FacesException Overrides javax. Do not call the default implementation of
| |
| normalizeRequestURI | back to summary |
|---|---|
| private String normalizeRequestURI(String uri, String mapping)
if the specified mapping is a prefix mapping, and the provided request URI (usually the value
from | |
| renderView | back to summary |
|---|---|
| public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException Implements abstract javax. Doc from javax.
Perform whatever actions are required to render the
response view to the response object associated with the current
Otherwise, the default implementation must obtain a reference to the
| |
| restoreView | back to summary |
|---|---|
| public UIViewRoot restoreView(FacesContext context, String viewId) Implements abstract javax. Doc from javax.
Perform whatever actions are required to restore
the view associated with the specified
Otherwise, the default implementation must obtain a reference to the
| |
| send404Error | back to summary |
|---|---|
| private void send404Error(FacesContext context) | |
| writeState | back to summary |
|---|---|
| public void writeState(FacesContext context) throws IOException Implements abstract javax. Doc from javax.
Take any appropriate action to either immediately write out the current state information (by
calling
This method must do nothing if the current request is an
| |
| Modifier and Type | Field and Description |
|---|---|
| private char[] | |
| private int | |
| private FacesContext | |
| private static final ThreadLocal | |
| private FastStringWriter | |
| private Writer | |
| private Writer | |
| private static final int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements abstract java. Implements java. |
| public void | flush()
Implements abstract java. Implements java. |
| public void | |
| public static ViewHandlerImpl. | |
| private static int | |
| public void | |
| public boolean | |
| public void | write(int
int specifying a character to be written c)Overrides java. |
| public void | write(char[]
Array of characters to be written cbuf)Overrides java. |
| public void | |
| public void | write(String
A String str, int Offset from which to start writing characters off, int Number of characters to write len)Overrides java. |
| public void | write(char[]
Array of characters cbuf, int Offset from which to start writing characters off, int Number of characters to write len)Implements abstract java. |
| public void |
| buf | back to summary |
|---|---|
| private char[] buf | |
| bufSize | back to summary |
|---|---|
| private int bufSize | |
| context | back to summary |
|---|---|
| private FacesContext context | |
| CUR_WRITER | back to summary |
|---|---|
| private static final ThreadLocal<ViewHandlerImpl. | |
| fWriter | back to summary |
|---|---|
| private FastStringWriter fWriter | |
| orig | back to summary |
|---|---|
| private Writer orig | |
| out | back to summary |
|---|---|
| private Writer out | |
| STATE_MARKER_LEN | back to summary |
|---|---|
| private static final int STATE_MARKER_LEN | |
| stateWritten | back to summary |
|---|---|
| private boolean stateWritten | |
| WriteBehindStateWriter | back to summary |
|---|---|
| public WriteBehindStateWriter(Writer out, FacesContext context, int bufSize) | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements abstract java. Implements java. Doc from java. Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams. If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| flushToWriter | back to summary |
|---|---|
| public void flushToWriter() throws IOException Write directly from our FastStringWriter to the provided writer.
| |
| getCurrentInstance | back to summary |
|---|---|
| public static ViewHandlerImpl. | |
| getNextDelimiterIndex | back to summary |
|---|---|
| private static int getNextDelimiterIndex(StringBuilder builder, int offset) | |
| release | back to summary |
|---|---|
| public void release() | |
| stateWritten | back to summary |
|---|---|
| public boolean stateWritten() | |
| write | back to summary |
|---|---|
| public void write(int c) throws IOException Overrides java. Doc from java. Writes a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored. Subclasses that intend to support efficient single-character output should override this method.
| |
| write | back to summary |
|---|---|
| public void write(char[] cbuf) throws IOException Overrides java. Doc from java. Writes an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(String str) throws IOException Overrides java. Doc from java. Writes a string.
| |
| write | back to summary |
|---|---|
| public void write(String str, int off, int len) throws IOException Overrides java. Doc from java. Writes a portion of a string.
| |
| write | back to summary |
|---|---|
| public void write(char[] cbuf, int off, int len) throws IOException Implements abstract java. Doc from java. Writes a portion of an array of characters.
| |
| writingState | back to summary |
|---|---|
| public void writingState() | |