0
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, only update the current page if I try to access a page that is outside the folder of the current page.
For example, if I’m on the page listUsuarios.xhtml and I try to access the registration pageUsuario.xhtml via Managedbean everything works:
public String acessaCadastro(){ return "cadastrarUsuario"; }
but if I am on the page listUsuarios.xhtml and I try to access usersAcoes.xhtml that is in another folder, nothing happens, just reload the page I am already on:
public String acessarAcoesUsuario(){ return "usuariosAcoes"; }
I tried so fearwell but did not solve:
public String acessarAcoesUsuario(){ return "Acoes/usuariosAcoes"; }
even so:
public String acessarAcoesUsuario(){ return "../Acoes/usuariosAcoes"; }
and yet:
public String acessarAcoesUsuario(){ return "Acoes/usuariosAcoes.xhtml"; }
or
public String acessarAcoesUsuario(){ return "../Acoes/usuariosAcoes.xhtml"; }
So, how can I resolve this issue? Remember that I don’t use faces-config.xml to create routes, since JSF 2.x already abstracts this.
Thanks @Weslley I will test and give you an answer
– Walter Gandarella
This way for me worked very well, thank you!!! The only thing is that I lost the URL capsulation, because before I did not appear all the way in the address bar, and now always appears for each page. But that’s just aesthetics
– Walter Gandarella