FlashMap

org.scalatra.FlashMap
class FlashMap extends Serializable

A FlashMap is the data structure used by org.scalatra.FlashMapSupport to allow passing temporary values between sequential actions.

As of Scalatra 2.7.x, it does not directly inherit Map.

Attributes

See also

FlashMapSupport

Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

object now

Sets a value for the current request only. It will be removed before the next request unless explicitly kept. Data put in this object is available as usual:

Sets a value for the current request only. It will be removed before the next request unless explicitly kept. Data put in this object is available as usual:

flash.now("notice") = "logged in successfully"
flash("notice") // "logged in successfully"

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
now.type

Value members

Concrete methods

def apply(key: String): Any

Returns the value associated with a key and flags it to be swept.

Returns the value associated with a key and flags it to be swept.

Attributes

def flag(): Unit

Flags all current keys so the entire map is cleared on the next sweep.

Flags all current keys so the entire map is cleared on the next sweep.

Attributes

def get(key: String): Option[Any]

Returns the value associated with a key and flags it to be swept.

Returns the value associated with a key and flags it to be swept.

Attributes

def iterator: Iterator[(String, Any)]

Creates a new iterator over the values of the flash map. These are the values that were added during the last request.

Creates a new iterator over the values of the flash map. These are the values that were added during the last request.

Attributes

def keep(): Unit

Clears all flags so no entries are removed on the next sweep.

Clears all flags so no entries are removed on the next sweep.

Attributes

def keep(key: String): Unit

Clears the flag for the specified key so its entry is not removed on the next sweep.

Clears the flag for the specified key so its entry is not removed on the next sweep.

Attributes

def remove(key: String): Any

Removes an entry from the flash map. It is no longer available for this request or the next.

Removes an entry from the flash map. It is no longer available for this request or the next.

Attributes

def sweep(): Unit

Removes all flagged entries.

Removes all flagged entries.

Attributes

def toSet: Set[(String, Any)]

Convert to Set

Convert to Set

Attributes

def update(key: String, value: Any): Unit

Adds an entry to the flash map. Clears the sweep flag for the key.

Adds an entry to the flash map. Clears the sweep flag for the key.

Attributes