Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play Framework 2.0 - where is jsAction?

Does Play Framework 2.0 have any built-in equivalent to 1.2.x's jsAction?

If not, how can I create such a tag?

Update: Thanks to Julien Richard-Foy who got me on the right track, I was able to use javascriptRouter. However, Play 2.0 doesn't provide any examples on how to use it in their manuals, so I made an example on how it is used in Java.

like image 767
Franz Avatar asked Mar 29 '12 12:03

Franz


1 Answers

Yes, there is a play.api.Routes object providing a way to generate a JavaScript reverse router. There also is a template tag, helper.javascriptRouter, which can be used directly in the templates.

like image 192
Julien Richard-Foy Avatar answered Oct 23 '22 11:10

Julien Richard-Foy