|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.context.FacesContext
org.apache.myfaces.orchestra.lib.jsf._FacesContextWrapper
public class _FacesContextWrapper
Convenient class to wrap the current FacesContext.
A class of this name is provided in JSF1.2, but not in JSF1.1.
Any methods that do not actually need to be overridden are declared final in order to improve performance (helps the JVM to optimise away the call).
Note that whether a newly-created instance immediately becomes the object that is returned by FacesContext.getCurrentInstance() depends upon the value of the "install" parameter for the constructor method.
This class is copied from the code in MyFaces Core Impl 1.2.x, but modified to be compatible with JSF1.1.
Note that this class must be public in order to support custom FacesContextFactory classes in other libraries that also wrap this instance, then use reflection to invoke methods on this object. In this case, an IllegalAccessException would occur if this class was package-scoped. However this class is NOT intended to be part of the public Orchestra API, and may change at any time.
Constructor Summary | |
---|---|
_FacesContextWrapper(javax.faces.context.FacesContext facesContext,
boolean install)
The install parameter controls whether this object will be configured as the object returned from calls to FacesContext.getCurrentInstance() or not. |
Method Summary | |
---|---|
void |
addMessage(java.lang.String clientId,
javax.faces.application.FacesMessage message)
|
javax.faces.application.Application |
getApplication()
|
java.util.Iterator |
getClientIdsWithMessages()
|
javax.el.ELContext |
getELContext()
Implement getELContext by delegating call to another instance. |
javax.faces.context.ExternalContext |
getExternalContext()
|
javax.faces.application.FacesMessage.Severity |
getMaximumSeverity()
|
java.util.Iterator |
getMessages()
|
java.util.Iterator |
getMessages(java.lang.String clientId)
|
javax.faces.render.RenderKit |
getRenderKit()
|
boolean |
getRenderResponse()
|
boolean |
getResponseComplete()
|
javax.faces.context.ResponseStream |
getResponseStream()
|
javax.faces.context.ResponseWriter |
getResponseWriter()
|
javax.faces.component.UIViewRoot |
getViewRoot()
|
void |
release()
|
void |
renderResponse()
|
void |
responseComplete()
|
void |
setResponseStream(javax.faces.context.ResponseStream responsestream)
|
void |
setResponseWriter(javax.faces.context.ResponseWriter responsewriter)
|
void |
setViewRoot(javax.faces.component.UIViewRoot viewRoot)
|
Methods inherited from class javax.faces.context.FacesContext |
---|
getCurrentInstance, setCurrentInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public _FacesContextWrapper(javax.faces.context.FacesContext facesContext, boolean install)
When only overriding the release() method, then install=false is ok as that is called directly by the FacesServlet on the instance returned by the FacesContextFactory. However all other methods are invoked on the object that is returned from FacesContext.getCurrentInstance, so install=true is needed in order for any other method overrides to have any effect.
IMPORTANT: install=true should not be used until MYFACES-1820 is fixed.
Method Detail |
---|
public void release()
release
in class javax.faces.context.FacesContext
public final javax.faces.application.Application getApplication()
getApplication
in class javax.faces.context.FacesContext
public final java.util.Iterator getClientIdsWithMessages()
getClientIdsWithMessages
in class javax.faces.context.FacesContext
public final javax.faces.context.ExternalContext getExternalContext()
getExternalContext
in class javax.faces.context.FacesContext
public final javax.faces.application.FacesMessage.Severity getMaximumSeverity()
getMaximumSeverity
in class javax.faces.context.FacesContext
public final java.util.Iterator getMessages()
getMessages
in class javax.faces.context.FacesContext
public final java.util.Iterator getMessages(java.lang.String clientId)
getMessages
in class javax.faces.context.FacesContext
public final javax.faces.render.RenderKit getRenderKit()
getRenderKit
in class javax.faces.context.FacesContext
public final boolean getRenderResponse()
getRenderResponse
in class javax.faces.context.FacesContext
public final boolean getResponseComplete()
getResponseComplete
in class javax.faces.context.FacesContext
public final void setResponseStream(javax.faces.context.ResponseStream responsestream)
setResponseStream
in class javax.faces.context.FacesContext
public final javax.faces.context.ResponseStream getResponseStream()
getResponseStream
in class javax.faces.context.FacesContext
public final void setResponseWriter(javax.faces.context.ResponseWriter responsewriter)
setResponseWriter
in class javax.faces.context.FacesContext
public final javax.faces.context.ResponseWriter getResponseWriter()
getResponseWriter
in class javax.faces.context.FacesContext
public final void setViewRoot(javax.faces.component.UIViewRoot viewRoot)
setViewRoot
in class javax.faces.context.FacesContext
public final javax.faces.component.UIViewRoot getViewRoot()
getViewRoot
in class javax.faces.context.FacesContext
public final void addMessage(java.lang.String clientId, javax.faces.application.FacesMessage message)
addMessage
in class javax.faces.context.FacesContext
public final void renderResponse()
renderResponse
in class javax.faces.context.FacesContext
public final void responseComplete()
responseComplete
in class javax.faces.context.FacesContext
public final javax.el.ELContext getELContext()
getELContext
in class javax.faces.context.FacesContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |