Hi everyone.
In my login.xhtml page the action does not call my managed bean method when I click on commandButton.
My login.xhtml is:
<div class="ui-g-12">
<p:commandButton value="Entrar" update="growl"
action="#{loginBean.validaLogin}" icon="ui-icon-person"/>
</div>
my method in LoginBean.java is:
public String validaLogin() {
String retorno = "login_ok";
EntityManagerFactory factory = Persistence.createEntityManagerFactory("scorpius");
EntityManager manager = factory.createEntityManager();
return retorno;
}
My faces-config.xml is :
<?xml version="1.0" encoding="utf-8"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-f ... ig_2_0.xsd">
<name>primefaces_serenity</name>
<navigation-rule>
<from-view-id>/login.xhtml</from-view-id>
<navigation-case>
<from-outcome>login_ok</from-outcome>
<to-view-id>/dashboard.xhtml</to-view-id>
</navigation-case>
</navigation-rule> .....
action does not work in p:commandButton
-
- Information
-
Who is online
Users browsing this forum: No registered users and 33 guests