In terms of a implementation of flash message in Play, I saw two ways.
Those are flash(flashKey, flashMessage) and flash().put(flashKey, flashMessage) where both flashKey and flashMessage are String.
What exactly is the difference?
What is the difference between flash(a, b) and flash().put(a, b) in PlayFramework?
104 Views Asked by Kazuya Tomita At
1
There are 1 best solutions below
Related Questions in PLAYFRAMEWORK
- Auto reload with play2
- Log of dependency does not show
- Json implicit format with recursive class definition
- Async LDAP authentication with play framework
- Why do I get an IndexOutOfBoundsException when my else should prevent it?
- Play 2.4 scala I am facing issues getting messages implicit in my code
- Play template project requires subscription to typesafe, why?
- hot swap in sbt project without play-plugin
- Getting "Cannot find HTTP header here" in play framework Scala
- How can I redirect to an error page in my Play app?
- How do you iterate over json when the schema is not known up front?
- Play Scala Converting sync to async
- morphia Geo-spatial "near" method in embedded list
- How to modify queryString and body of the request before being processed by the routes in Playframework 2 Scala?
- Not able to access key-values pairs in a JSON using Play library in scala
Related Questions in PLAYFRAMEWORK-2.2
- Getting "Cannot find HTTP header here" in play framework Scala
- Logback encoder layout for processing output of org.jboss.netty.handler.logging.LoggingHandler
- Advanced HTTP server configurations in Play 2.3
- PlayFramework2. Using nested classes in router
- PlayFramework 2.2.6. Default cache expiration
- Play Framework Ebean two ManyToMany relations return same data
- Scala application definition error : not found : value ~
- What is the difference between flash(a, b) and flash().put(a, b) in PlayFramework?
- declare a scala variable in play 2
- action method not working on input in playframework2.0
- Playframework get client IP from server, but not from cookies
- WS.url fails when proxy options are set in Play Framework 2.2.x
- Getting javaScript data send with ajax with Playframework2 DynamicForm object. Error: data={data[undefined]=}
- Database tuning performance from play framework in play scala project
- Am I using EhCache mechanism rightly?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
flash().put(key, message)is the Flash class interface for adding the given value the flash scopeflash(key, message)is the RequestBuilder interface for updating the flash session. Under the hood it does exactly the same asnew HashMap<>(flash()).put(key, message)(source here) but it looks like it does the additional step of updating the request cookiesI believe you should use
flash(key, message)to ensure that any updates to the flash are persisted.