private String getFacesDynaViewId() { try { webXmlParser.parse(servletContext); return dynaview.buildDynaViewId(webXmlParser.getFacesMapping()); } catch (Exception e) { throw new PrettyException("Could not retrieve DynaViewId.", e); } }
/** * Calculate the Faces ViewId to which this request URI resolves. This method will recursively call any dynamic * mapping viewId functions as needed until a String viewId is returned, or supplied by a static mapping. * <p> * This phase does not support FacesNavigation or PrettyRedirecting. Its SOLE purpose is to resolve a viewId. * <p> * <i><b>Note:</b> Precondition - parameter injection must take place before this</i> * <p> * <i>Postcondition - currentViewId is set to computed View Id</i> * * @param facesContext2 * * @return JSF viewID to which this request resolves. */ public String computeDynaViewId(final FacesContext facesContext) { PrettyContext context = PrettyContext.getCurrentInstance(facesContext); UrlMapping urlMapping = context.getCurrentMapping(); return calculateDynaviewId(facesContext, urlMapping); }
/** * 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); } }
dynaview.processDynaView(prettyContext, event.getFacesContext());
dynaview.processDynaView(prettyContext, event.getFacesContext());
/** * Calculate the Faces ViewId to which this request URI resolves. This method will recursively call any dynamic * mapping viewId functions as needed until a String viewId is returned, or supplied by a static mapping. * <p> * This phase does not support FacesNavigation or PrettyRedirecting. Its SOLE purpose is to resolve a viewId. * <p> * <i><b>Note:</b> Precondition - parameter injection must take place before this</i> * <p> * <i>Postcondition - currentViewId is set to computed View Id</i> * * @param facesContext2 * * @return JSF viewID to which this request resolves. */ public String computeDynaViewId(final FacesContext facesContext) { PrettyContext context = PrettyContext.getCurrentInstance(facesContext); UrlMapping urlMapping = context.getCurrentMapping(); return calculateDynaviewId(facesContext, urlMapping); }
private String getFacesDynaViewId() { try { webXmlParser.parse(servletContext); return dynaview.buildDynaViewId(webXmlParser.getFacesMapping()); } catch (Exception e) { throw new PrettyException("Could not retrieve DynaViewId.", e); } }
/** * 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); } }
dynaview.processDynaView(prettyContext, event.getFacesContext());
/** * Calculate the Faces ViewId to which this request URI resolves. This method will recursively call any dynamic * mapping viewId functions as needed until a String viewId is returned, or supplied by a static mapping. * <p> * This phase does not support FacesNavigation or PrettyRedirecting. Its SOLE purpose is to resolve a viewId. * <p> * <i><b>Note:</b> Precondition - parameter injection must take place before this</i> * <p> * <i>Postcondition - currentViewId is set to computed View Id</i> * * @param facesContext2 * * @return JSF viewID to which this request resolves. */ public String computeDynaViewId(final FacesContext facesContext) { PrettyContext context = PrettyContext.getCurrentInstance(facesContext); UrlMapping urlMapping = context.getCurrentMapping(); return calculateDynaviewId(facesContext, urlMapping); }
private String getFacesDynaViewId() { try { webXmlParser.parse(servletContext); return dynaview.buildDynaViewId(webXmlParser.getFacesMapping()); } catch (Exception e) { throw new PrettyException("Could not retrieve DynaViewId.", e); } }
/** * 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); } }
dynaview.processDynaView(prettyContext, event.getFacesContext());
/** * Calculate the Faces ViewId to which this request URI resolves. This method will recursively call any dynamic * mapping viewId functions as needed until a String viewId is returned, or supplied by a static mapping. * <p> * This phase does not support FacesNavigation or PrettyRedirecting. Its SOLE purpose is to resolve a viewId. * <p> * <i><b>Note:</b> Precondition - parameter injection must take place before this</i> * <p> * <i>Postcondition - currentViewId is set to computed View Id</i> * * @param facesContext2 * * @return JSF viewID to which this request resolves. */ public String computeDynaViewId(final FacesContext facesContext) { PrettyContext context = PrettyContext.getCurrentInstance(facesContext); UrlMapping urlMapping = context.getCurrentMapping(); return calculateDynaviewId(facesContext, urlMapping); }
private String getFacesDynaViewId() { try { webXmlParser.parse(servletContext); return dynaview.buildDynaViewId(webXmlParser.getFacesMapping()); } catch (Exception e) { throw new PrettyException("Could not retrieve DynaViewId.", e); } }
/** * 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); } }
if (mapping.isDynaView()) viewId = dynaview.calculateDynaviewId(context, mapping);
if (mapping.isDynaView()) viewId = dynaview.calculateDynaviewId(context, mapping);