play 2.3.6, java 1.8 how to pass session to scala templates -
i know there lot of links in discussion either related old framework version or don't work me,
what want pass session scala templates without having pass them explicitly form controllers, didn't find examples(working) of implicit parameters in play 2.3.x version, view rendered ok(welcome.render(msg))
, in template i'm doing @(notice: string)(implicit session: play.api.mvc.session)
gives me method render in class welcome cannot applied given types;
error, tried with
@(notice: string)(implicit request: play.api.mvc.request[any])
@(notice: string)(implicit request: requestheader)
but none seem work, know can pass required session values controller i'm trying send user data that'd required in navbar required in each view don't want send controllers.
any appreciated
play session might retrieved scala templates session helper, statement below. altough i'm using play 2.2.1, may work well. btw, have never needed implicit parameter in order reach it.
@session.get("keyvalue")
i may have misunderstood question, if want session values view that's standard way.
Comments
Post a Comment