I have the following problem: I have a hierarchy of folders where I separate my web pages from the project:
Web
|- Acoes
| |- usuariosAcoes.xhtml
| |- cadastrarAcao.xhtml
|- usuarios
| |- listarUsuarios.xhtml
| |- cadastrarUsuario.xhtml
But when I try to navigate through ManagedBean the pages do not load, it only updates the current page if I try to access a page that is outside the current page's folder.
For example, if I am on the page listUsuarios.xhtml and I try to access the page registerUsuario.xhtml via ManagedBean everything works:
public String acessaCadastro(){ return "cadastrarUsuario"; }
But if I'm on the page list UUsuarios.xhtml and I try to access usersAx.xhtml that is in another folder, nothing happens, just reload the page I'm already in:
public String acessarAcoesUsuario(){ return "usuariosAcoes"; }
I tried this way but it did not work:
public String acessarAcoesUsuario(){ return "Acoes/usuariosAcoes"; }
Not so:
public String acessarAcoesUsuario(){ return "../Acoes/usuariosAcoes"; }
And not so:
public String acessarAcoesUsuario(){ return "Acoes/usuariosAcoes.xhtml"; }
or
public String acessarAcoesUsuario(){ return "../Acoes/usuariosAcoes.xhtml"; }
So, how can I resolve this issue? Remembering that I do not use faces-config.xml to create routes, since JSF 2.x already abstracts this.