I'm new to scala and play.
I want call a controller func from view but I don't want to return Result type. What I want to do is modify the Request.session value.
The approach I did was : 1) case
1) case
controller :
def func(id : Int)(implicit request: RequestHeader) = { ... }
routes :
GET /cart/cancel/:id controllers.ProductController.func(id:Int)
But it gave me a compilation error : Cannot find any HTTP Request Header here
So I did the another approach 2) case
2) case
controller :
def func(id : Int) = Action { implicit request => ... Ok()}
Yes. It worked. But this time I have Result type returned. So I'm obligated to change the state of page anyway
Is there any way to deal with session value without Action function (without state transition) ?
Thank you!