Is there some way how to redirect page to other page from Java method?
I'm able only to forward it using:
FacesContext.getCurrentInstance().getExternalContext().dispatch("/foo.xhtml");
or using navigation-rules of faces-config.xml
.
Do you have any ideas?