I have a controller Foo in play framework scala project:
In Foo controller (in Foo.scala) I have action
object Foo extends Controller {
def baz() = {
Application.bar开发者_如何转开发()
}
In baz action I want to call bar action defined in controller Application (in controllers.scala) . But above does not work as I get compile error Application.bar does not take parameters.
Try with:
Action(Application.bar)
精彩评论