I'm starting with sf and I'm having a problem with this project.
The following command does not create the link on the screen that I need to go to the next page, just give me "New user" written on the screen:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Financeiro</title>
</h:head>
<h:body>
<h1>Financeiro</h1>
<h:form>
<h:commandLink action="#{usuarioBean.novo}">Novo Usuário</h:commandLink>
</h:form>
</h:body>
</html>
I also tried this variation, without success:
<h:commandLink action="#{usuarioBean.novo}" value="Novo usuário"/>
The method called by #{usuarioBean.novo}
public class UsuarioBean {
private Usuario usuario = new Usuario();
private String confirmarSenha;
public String novo() {
this.usuario = new Usuario();
this.usuario.setAtivo(true);
return "/publico/usuario";
}
}
Can anyone identify where the error is?