java - Generate fragments of html view template in Play Framework -
i know how generate html in java, , pass view using parameter. how can achieve this?
i've searched official play framework documentation, nothing found it.
i know possible because can pass 1 template using variable.
in case generate view on java. f.e. create method display in inherited classes generate ready use html code.
please help
playframework 2.2.6
why won't use play.twirl.api.html?
your action:
public result youraction() { html myhtml = new html("<h1>it works out of box</h1>"); return ok(yourview.render(myhtml)); } yourview.scala.html
@(myhtml: html) code: @myhtml works out of box, @ least play 2.3+
Comments
Post a Comment