playframework 2.0 - Play2 for Scala: is Action Chaining a missing feature? -
few days ago run missing feature of play, action chaining. here's mean:
i have controller 2 actions, , i'd call action action in order stay dry. goal automatically sign user in after signs on.
object mycontroller extends controller { def signon = action { // ... stuff sign user on signin // call next action } def signin = action { // ... stuff sign user in ok("welcome, dude!") } } i've found nice outdated solution here (it's play 2.0.x)
http://www.natalinobusa.com/2012/07/chained-actions-in-play-framework-20.html
now i'm trying write similar on play 2.2.x i'd know if missing feature , if of has implemented similar.
and finally: think nice have in framework?
what doing this?
def signon = action.async { request => // ... stuff sign user on signin(request) // call next action } def signin = action { // ... stuff sign user in ok("welcome, dude!") }
Comments
Post a Comment