When I call other action in one action, it also display itself template, in Play 1.1 RC
and when I Redirect("...url")
but it does not work, is there someone that can help me?
Just to add to the answers above, here's how you redirect to an external url:
public static void index() { redirect("http://geeks.aretotally.in"); }
To redirect, you simply call the action. From the example in the documentation:
public static void show(Long id) {
Article article = Article.findById(id);
render(article);
}
public static void edit(Long id, String title) {
Article article = Article.findById(id);
article.title = title;
article.save();
show(id);
}
At the end of the edit action, the call to show(...) will cause a redirect on the client's browser as if they had hit the same URL that routes to the show method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With