Commit 3a713f768d9a492e82c95d390313f114488d6c38
1 parent
d9e0312e
Exists in
master
Correção na obtenção da URL para redirecionamento.
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 | } | ... | ... |