How to redirect to the same page (I don't know the page; the redirection is done inside a menu shared by several pages) ?
I tried
return "?faces-redirect=true";
at the end of the action method, but I received an error message because it is not possible to find a navigation case for "?faces-redirect=true".
Thanks in advance for your help.
You need to supply a valid view ID in the outcome and not only a query string. You can obtain the current view ID by UIViewRoot#getViewId()
.
String viewId = FacesContext.getCurrentInstance().getViewRoot().getViewId();
return viewId + "?faces-redirect=true";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With