-
-
Save Felipe00/11459ef88d07d15f34502a27baac6bac to your computer and use it in GitHub Desktop.
Chamando um método do Controller através da View - Play framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="email" id="email" name="email" /> | |
<input type="password" id="password" name="password" /> | |
<a href="@routes.SeuController.login()">ACESSAR SISTEMA</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Arquivo de rotas | |
# ... Outras rotas aqui | |
GET /login controllers.SeuController.login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SeuController extends Controller { | |
public Result login() { | |
System.out.println("Chamando meu método java"); | |
// Aqui vc faz algo... | |
// retorno pra view... | |
return ok(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Passo-a-Passo: