On p:ajax call,listener invokes method which contains
doesn't work. Ive set a break point on the line and it remains at the same point on execution.It doesn't move forward, I ve got to restart server to run the application again.
redirection works perfectly fine. But i want page forward which is dispatch to navigate to another page.
window.location call on the given URL (you can find an XML example in this answer).
You have 2 options:
Making a non-ajax request is most likely not an option for
<p:ajax>. In that case, performing a normal navigation is really your only option.
FacesContext context = FacesContext.getCurrentInstance(); context.getApplication().getNavigationHandler().handleNavigation(context, null, "/uri.jsf");
It will in case of ajax requests automatically force an
render="@all" with the new content.