| Constructor and Description |
|---|
NoOpFlash() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
void |
doPostPhaseActions(jakarta.faces.context.FacesContext ctx)
Called after the execution of every lifecycle phase, this method allows implementations to take the necessary actions to provide the Flash scope contract as it applies to the request procesing lifecycle. |
void |
doPrePhaseActions(jakarta.faces.context.FacesContext ctx)
Called before the execution of every lifecycle phase, this method allows implementations to take the necessary actions to provide the Flash scope contract as it applies to the request procesing lifecycle. |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
boolean |
isEmpty() |
boolean |
isKeepMessages()
Return the value of this JavaBeans property for the flash for this session. |
boolean |
isRedirect()
Return the value of this property for the flash for this session. |
void |
keep(String key)
Causes a value stored with a previous call to |
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,? extends Object> m) |
void |
putNow(String key,
Object value)
Puts a value in the flash so that it can be accessed on this traversal of the lifecycle, rather than on the next traversal. |
Object |
remove(Object key) |
void |
setKeepMessages(boolean newValue)
Setter for |
void |
setRedirect(boolean newValue)
Setting this property to |
int |
size() |
Collection<Object> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic void doPostPhaseActions(jakarta.faces.context.FacesContext ctx)
jakarta.faces.context.FlashCalled after the execution of every lifecycle phase, this method allows implementations to take the necessary actions to provide the Flash scope contract as it applies to the request procesing lifecycle.
doPostPhaseActions in class jakarta.faces.context.Flashctx - the FacesContext for this request.public void doPrePhaseActions(jakarta.faces.context.FacesContext ctx)
jakarta.faces.context.FlashCalled before the execution of every lifecycle phase, this method allows implementations to take the necessary actions to provide the Flash scope contract as it applies to the request procesing lifecycle.
doPrePhaseActions in class jakarta.faces.context.Flashctx - the FacesContext for this request.public boolean isKeepMessages()
jakarta.faces.context.Flash
Return the value of this JavaBeans property for the flash for this session. This value determines whether or not any
FacesMessage instances queued in the current
FacesContext must be preserved so they are accessible on the next traversal of the
lifecycle on this session, regardless of the request being a redirect after post, or a normal postback.
Map accesses for the special key “keepMessages” must return the value of this
JavaBeans property.
Jakarta Expression Language Usage Example
First page
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> <!-- extra code removed --> <c:set target="#{flash}" property="keepMessages" value="true" />Next page
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"> <!-- extra code removed --> <h:messages /> Any messages present on the first page must be displayed on this page.
isKeepMessages in class jakarta.faces.context.Flashpublic boolean isRedirect()
jakarta.faces.context.Flash
Return the value of this property for the flash for this session. This must be false unless:
Flash.setRedirect(boolean) was called for the current lifecycle traversal with true as the argument.
The current lifecycle traversal for this session is in the “execute” phase and the previous traversal had
Flash.setRedirect(boolean) called with true as the argument.
isRedirect in class jakarta.faces.context.Flashpublic void keep(String key)
jakarta.faces.context.Flash
Causes a value stored with a previous call to Flash.putNow(java.lang.String, java.lang.Object), its Jakarta Expression Language equivalent, or to the
request Map, to be promoted to the flash so that is available on the next traversal through the
lifecycle on this session.
keep in class jakarta.faces.context.Flashkey - if argument key is the name of an entry previously stored to the flash on this traversal
through the lifecycle via a call to Flash.putNow(java.lang.String, java.lang.Object), or to a set to the EL expression
#{flash.now.<key>}, or to the request Map, to be promoted to the flash as if a
call to put() or a set to the expression #{flash.<key>} was being called.public void putNow(String key, Object value)
jakarta.faces.context.FlashPuts a value in the flash so that it can be accessed on this traversal of the lifecycle, rather than on the next traversal. This is simply an alias for putting a value in the request map.
Jakarta Expression Language Usage Example
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> <!-- extra code removed --> <c:set target="#{flash.now}" property="bar" value="barValue" /> <p>Value of \#{flash.now.bar}, should be barValue.</p> <h:outputText value="#{flash.now.bar}" />
putNow in class jakarta.faces.context.Flashkey - the key for this entryvalue - the value for this entrypublic void setKeepMessages(boolean newValue)
jakarta.faces.context.Flash
Setter for keepMessages JavaBeans property. See Flash.isKeepMessages().
setKeepMessages in class jakarta.faces.context.FlashnewValue - the new value for this property on this session.public void setRedirect(boolean newValue)
jakarta.faces.context.Flash
Setting this property to true indicates that the next request on this session will be a redirect. Recall
that on a redirect, the server sends a special response to the client instructing it to issue a new request to a
specific URI. The implementation must insure that reading the value of this property on that request will return
true.
Jakarta Expression Language Usage Example
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> <!-- extra code removed --> <c:set target="#{flash}" property="redirect" value="true" />
setRedirect in class jakarta.faces.context.FlashnewValue - the new value for this property on this session.public void clear()
public boolean containsKey(Object key)
public boolean containsValue(Object value)
public boolean isEmpty()
public int size()
public Collection<Object> values()
Copyright © 2010–2022 JBoss by Red Hat. All rights reserved.