public static PrettyRedirector getInstance() { return new PrettyRedirector(); }
/** * Handle DynaView processing. This method will end the Faces life-cycle. */ public void processDynaView(final PrettyContext prettyContext, final FacesContext facesContext) { log.trace("Requesting DynaView processing for: " + prettyContext.getRequestURL()); String viewId = ""; try { viewId = prettyContext.getCurrentViewId(); log.trace("Invoking DynaView method: " + viewId); Object result = computeDynaViewId(facesContext); if (result instanceof String) { viewId = (String) result; log.trace("Forwarding to DynaView: " + viewId); prettyContext.setDynaviewProcessed(true); facesContext.getExternalContext().dispatch(viewId); facesContext.responseComplete(); } } catch (Exception e) { log.error("Failed to process dynaview", e); PrettyRedirector prettyRedirector = new PrettyRedirector(); prettyRedirector.send404(facesContext); throw new PrettyException("Could not forward to view: " + viewId + "", e); } }
encodeURL(externalContext, config, target); return true; else if (isPrettyNavigationCase(prettyContext, action)) + builder.buildQueryString(mapping); log.trace("Redirecting to mappingId [" + mapping.getId() + "], [" + target + "]"); encodeURL(externalContext, config, target);
@Override public void handleNavigation(final FacesContext context, final String fromAction, final String outcome) { log.debug("Navigation requested: fromAction [" + fromAction + "], outcome [" + outcome + "]"); if (!pr.redirect(context, outcome)) { processFacesNavigation(context, fromAction, outcome); } }
/** * Handle DynaView processing. This method will end the Faces life-cycle. */ public void processDynaView(final PrettyContext prettyContext, final FacesContext facesContext) { log.trace("Requesting DynaView processing for: " + prettyContext.getRequestURL()); String viewId = ""; try { viewId = prettyContext.getCurrentViewId(); log.trace("Invoking DynaView method: " + viewId); Object result = computeDynaViewId(facesContext); if (result instanceof String) { viewId = (String) result; log.trace("Forwarding to DynaView: " + viewId); prettyContext.setDynaviewProcessed(true); facesContext.getExternalContext().dispatch(viewId); facesContext.responseComplete(); } } catch (Exception e) { PrettyRedirector prettyRedirector = new PrettyRedirector(); prettyRedirector.send404(facesContext); throw new PrettyException("Could not forward to view: " + viewId + "", e); } }
encodeURL(externalContext, config, target); return true; else if (isPrettyNavigationCase(prettyContext, action)) + builder.buildQueryString(mapping); log.trace("Redirecting to mappingId [" + mapping.getId() + "], [" + target + "]"); encodeURL(externalContext, config, target);
@Override public void handleNavigation(final FacesContext context, final String fromAction, final String outcome) { log.debug("Navigation requested: fromAction [" + fromAction + "], outcome [" + outcome + "]"); if (!pr.redirect(context, outcome)) { log.debug("Not a PrettyFaces navigation string - passing control to default nav-handler"); PrettyContext prettyContext = PrettyContext.getCurrentInstance(context); prettyContext.setInNavigation(true); String originalViewId = context.getViewRoot().getViewId(); parent.handleNavigation(context, fromAction, outcome); String newViewId = context.getViewRoot().getViewId(); /* * Navigation is complete if the viewId has not changed or the response is complete */ if ((true == context.getResponseComplete()) || originalViewId.equals(newViewId)) { prettyContext.setInNavigation(false); } } }
/** * Handle DynaView processing. This method will end the Faces life-cycle. */ public void processDynaView(final PrettyContext prettyContext, final FacesContext facesContext) { log.trace("Requesting DynaView processing for: " + prettyContext.getRequestURL()); String viewId = ""; try { viewId = prettyContext.getCurrentViewId(); log.trace("Invoking DynaView method: " + viewId); Object result = computeDynaViewId(facesContext); if (result instanceof String) { viewId = (String) result; log.trace("Forwarding to DynaView: " + viewId); prettyContext.setDynaviewProcessed(true); facesContext.getExternalContext().dispatch(viewId); facesContext.responseComplete(); } } catch (Exception e) { log.error("Failed to process dynaview", e); PrettyRedirector prettyRedirector = new PrettyRedirector(); prettyRedirector.send404(facesContext); throw new PrettyException("Could not forward to view: " + viewId + "", e); } }
encodeURL(externalContext, config, target); return true; else if (isPrettyNavigationCase(prettyContext, action)) + builder.buildQueryString(mapping); log.trace("Redirecting to mappingId [" + mapping.getId() + "], [" + target + "]"); encodeURL(externalContext, config, target);
public static PrettyRedirector getInstance() { return new PrettyRedirector(); }
@Override public void handleNavigation(final FacesContext context, final String fromAction, final String outcome) { log.debug("Navigation requested: fromAction [" + fromAction + "], outcome [" + outcome + "]"); if (!pr.redirect(context, outcome)) { log.debug("Not a PrettyFaces navigation string - passing control to default nav-handler"); PrettyContext prettyContext = PrettyContext.getCurrentInstance(context); prettyContext.setInNavigation(true); String originalViewId = context.getViewRoot().getViewId(); parent.handleNavigation(context, fromAction, outcome); String newViewId = context.getViewRoot().getViewId(); /* * Navigation is complete if the viewId has not changed or the response is complete */ if ((true == context.getResponseComplete()) || originalViewId.equals(newViewId)) { prettyContext.setInNavigation(false); } } }
/** * Handle DynaView processing. This method will end the Faces life-cycle. */ public void processDynaView(final PrettyContext prettyContext, final FacesContext facesContext) { log.trace("Requesting DynaView processing for: " + prettyContext.getRequestURL()); String viewId = ""; try { viewId = prettyContext.getCurrentViewId(); log.trace("Invoking DynaView method: " + viewId); Object result = computeDynaViewId(facesContext); if (result instanceof String) { viewId = (String) result; log.trace("Forwarding to DynaView: " + viewId); prettyContext.setDynaviewProcessed(true); facesContext.getExternalContext().dispatch(viewId); facesContext.responseComplete(); } } catch (Exception e) { log.error("Failed to process dynaview", e); PrettyRedirector prettyRedirector = new PrettyRedirector(); prettyRedirector.send404(facesContext); throw new PrettyException("Could not forward to view: " + viewId + "", e); } }
encodeURL(externalContext, config, target); return true; else if (isPrettyNavigationCase(prettyContext, action)) + builder.buildQueryString(mapping); log.trace("Redirecting to mappingId [" + mapping.getId() + "], [" + target + "]"); encodeURL(externalContext, config, target);
public static PrettyRedirector getInstance() { return new PrettyRedirector(); }
public static PrettyRedirector getInstance() { return new PrettyRedirector(); }