https://kotlinlang.org logo
#announcements
Title
# announcements
v

v79

08/01/2017, 8:03 PM
Copy code
request.session().attribute('flash')[key] = [requests: 1, value: value]
t

tipsy

08/01/2017, 8:15 PM
i don't know groovy, but if this is spark,
attribute(key)
will get a session attribute (which can be whatever). in this case it seems to be a map<key, pair>
think of it like this:
Copy code
val map = request.session().attribute('flash');
map[key] = [requests: 1, value: value]
so the code just updates a custom-attribute called "flash".. if you're not using this, you can remove the line
v

v79

08/01/2017, 9:09 PM
It's the map<key,pair> that's been really confusing me. With all of groovy's magic typing, I couldn't work out what the types were.
I've been trying to build a flash scope in kotlin-spark