Class FlashScope
java.lang.Object
com.atlassian.confluence.struts.flash.FlashScope
Flash Scope allows one request to pass data to the next request if it's a redirect.
FlashScope only becomes available if the redirect action result is specified as "redirectwithflash" (check
struts.xml)
In a REST request, need to call persist() and getFlashScopeUrl(String, String) to persist and build
the URL that supports FlashScope
- Since:
- 9.3
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectRetrieves FlashScope items stored in the previous requeststatic StringgetFlashScopeUrl(String url, String flashId) Decorate an URL with FlashScope information.static booleanstatic Stringpersist()Persist FlashScope values recorded so far in the current request usingput(String, Object)static voidAdds things to the FlashScope.
-
Field Details
-
FLASH_ID_PARAM
- See Also:
-
-
Constructor Details
-
FlashScope
public FlashScope()
-
-
Method Details
-
put
Adds things to the FlashScope. They will be available to the request after the current one. -
get
Retrieves FlashScope items stored in the previous request -
has
- Returns:
- true if FlashScope item was stored in the previous request
-
getFlashScopeUrl
Decorate an URL with FlashScope information. The next request with the decorated URL will have access to FlashScope values. Mainly for use inside REST requests. Inside an XWork request, seeRedirectWithFlashResult- Parameters:
url- a normal url without FlashScope information yetflashId- FlashScope information- Returns:
- decorated url which carries the FlashScope information
-
persist
Persist FlashScope values recorded so far in the current request usingput(String, Object)- Returns:
- a String carrying FlashScope information, which can be used in
getFlashScopeUrl(String, String)
-