playframework 2.0 - How can I figure out which Template (class) is being used based on the URL? -


for example, if url "/" how can tell in application controller template using render (for example "app/views/index.scala.html")?

update question: have ajax call passed url "localhost:9000/bob";. in controller, want find out template used returned controller method generated/s "localhost:9000/bob";.

maybe not possible play?

the templates rendered normal classes, can call. template want in action.

in scala:

def index = action {   ok(views.html.index("your new application ready.")) } 

in java:

public static result index() {   return ok(views.html.index.render("your new application ready.")); } 

also have @ documentation. you'll find tutorial there building simple first todo list application. (scala version, java version)


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -