Commit acae122be5435b21c2bcfaf894395282a1236087
Exists in
master
Merge branch '2.3' of https://github.com/demoiselle/framework.git into 2.3
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Redirector.java
... | ... | @@ -58,9 +58,14 @@ public class Redirector implements Serializable { |
58 | 58 | public static void redirect(String viewId, Map<String, Object> params) { |
59 | 59 | try { |
60 | 60 | if (viewId != null && !viewId.isEmpty()) { |
61 | + Boolean includeViewParams = true; | |
62 | + if (params.isEmpty()) { | |
63 | + includeViewParams = false; | |
64 | + } | |
65 | + | |
61 | 66 | FacesContext facesContext = Beans.getReference(FacesContext.class); |
62 | 67 | ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); |
63 | - String url = viewHandler.getBookmarkableURL(facesContext, viewId, parse(params), true); | |
68 | + String url = viewHandler.getBookmarkableURL(facesContext, viewId, parse(params), includeViewParams); | |
64 | 69 | |
65 | 70 | facesContext.getExternalContext().redirect(url); |
66 | 71 | } | ... | ... |