Commit eb1cb58a892c87758b03fd320140d207afc9b0d9
1 parent
34695000
Exists in
master
Simplificando a implementação...
Showing
1 changed file
with
2 additions
and
6 deletions
Show diff stats
impl/extension/jsf/src/main/java/br/gov/frameworkdemoiselle/util/Redirector.java
| ... | ... | @@ -58,14 +58,10 @@ 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 | - | |
| 66 | 61 | FacesContext facesContext = Beans.getReference(FacesContext.class); |
| 67 | 62 | ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); |
| 68 | - String url = viewHandler.getBookmarkableURL(facesContext, viewId, parse(params), includeViewParams); | |
| 63 | + String url = viewHandler.getBookmarkableURL(facesContext, viewId, parse(params), params == null ? false | |
| 64 | + : !params.isEmpty()); | |
| 69 | 65 | |
| 70 | 66 | facesContext.getExternalContext().redirect(url); |
| 71 | 67 | } | ... | ... |