|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.context.PartialViewContext javax.faces.context.PartialViewContextWrapper org.omnifaces.context.OmniPartialViewContext
public class OmniPartialViewContext
This OmniFaces partial view context extends and improves the standard partial view context as follows:
PartialResponseWriter.startEval()
.ExternalContext.getResponseBufferSize()
regardless of
ResponseWriter.flush()
calls (which defaults to javax.faces.FACELETS_BUFFER_SIZE
).ViewExpiredException
occurs during an ajax request on a restricted
page. The enduser will now properly be redirected to the login page.Ajax
utility class to easily add callback scripts and arguments.
This partial view context is already registered by OmniFaces' own faces-config.xml and thus gets auto-initialized when the OmniFaces JAR is bundled in a webapp, so end-users do not need to register this partial view context explicitly themselves.
Field Summary |
---|
Fields inherited from class javax.faces.context.PartialViewContext |
---|
ALL_PARTIAL_PHASE_CLIENT_IDS, PARTIAL_EXECUTE_PARAM_NAME, PARTIAL_RENDER_PARAM_NAME |
Constructor Summary | |
---|---|
OmniPartialViewContext(javax.faces.context.PartialViewContext wrapped)
Construct a new OmniFaces partial view context around the given wrapped partial view context. |
Method Summary | |
---|---|
void |
addArgument(java.lang.String name,
java.lang.Object value)
Add an argument to the partial response. |
void |
addCallbackScript(java.lang.String callbackScript)
Add a callback script to the partial response. |
void |
closePartialResponse()
Close the partial response. |
static OmniPartialViewContext |
getCurrentInstance()
Returns the current instance of the OmniFaces partial view context. |
javax.faces.context.PartialResponseWriter |
getPartialResponseWriter()
|
javax.faces.context.PartialViewContext |
getWrapped()
|
void |
resetPartialResponse()
Reset the partial response. |
void |
setPartialRequest(boolean isPartialRequest)
|
Methods inherited from class javax.faces.context.PartialViewContextWrapper |
---|
getExecuteIds, getRenderIds, isAjaxRequest, isExecuteAll, isPartialRequest, isRenderAll, processPartial, release, setRenderAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OmniPartialViewContext(javax.faces.context.PartialViewContext wrapped)
wrapped
- The wrapped partial view context.Method Detail |
---|
public javax.faces.context.PartialResponseWriter getPartialResponseWriter()
getPartialResponseWriter
in class javax.faces.context.PartialViewContextWrapper
public void setPartialRequest(boolean isPartialRequest)
setPartialRequest
in class javax.faces.context.PartialViewContext
public javax.faces.context.PartialViewContext getWrapped()
getWrapped
in interface javax.faces.FacesWrapper<javax.faces.context.PartialViewContext>
getWrapped
in class javax.faces.context.PartialViewContextWrapper
public void addArgument(java.lang.String name, java.lang.Object value)
OmniFaces.Ajax.data
.
For supported argument value types, read Json.encode(Object)
. If a given argument type is not supported,
then an IllegalArgumentException
will be thrown during end of render response.
name
- The argument name.value
- The argument value.public void addCallbackScript(java.lang.String callbackScript)
callbackScript
- The callback script to be added to the partial response.public void resetPartialResponse()
PartialResponseWriter
.
FullAjaxExceptionHandler
public void closePartialResponse()
FullAjaxExceptionHandler
public static OmniPartialViewContext getCurrentInstance()
java.lang.IllegalStateException
- When there is no current instance of the OmniFaces partial view context. That can
happen when the OmniPartialViewContextFactory
is not properly registered, or when there's another
PartialViewContext
implementation which doesn't properly delegate through the wrapped instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |