#{form @App.doRegister()}
#{form @App.doSearch()}
They are both expanded to
<form action="/register" method="POST"...>
But in routes , I can only define 'POST /register' to one
destination :
GET /register App.register
POST /register App.doRegister
How do I route another 'POST /register' to App.doSearch() ?
In fact the routes file has suggestions like:
POST /{Controller}/{Action} {controller}.action
I hope this help.
But , what if there is two forms in one page ?
It's a normal scenario.
Take this page (groups.google.com) for example , the main canvas is
articles and 'reply' form , and the upper right is 'search' form.
How to accomplish it in Play! ?
POST
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>
You can have the same path used by 2 different actions. Just use 2
different paths:
POST /register Application.doRegister
POST /search Application.doSearch
(btw the way search actions are commonly mapped to GET method)