/** * Builds the view if not already available. This is mostly required for ViewExpiredException's. * * @param context The {@link FacesContext}. * @param throwable The occurred {@link Throwable}. * @param rootCause The root cause. * @return The unwrapped {@link Throwable}. * @throws java.io.IOException If building the view fails. */ protected Throwable buildView(FacesContext context, Throwable throwable, Throwable rootCause) throws IOException { if (context.getViewRoot() == null) { ViewHandler viewHandler = context.getApplication().getViewHandler(); String viewId = viewHandler.deriveViewId(context, ComponentUtils.calculateViewId(context)); ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(context, viewId); UIViewRoot viewRoot = vdl.createView(context, viewId); context.setViewRoot(viewRoot); vdl.buildView(context, viewRoot); // Workaround for Mojarra // if UIViewRoot == null -> 'IllegalArgumentException' is throwed instead of 'ViewExpiredException' if (rootCause == null && throwable instanceof IllegalArgumentException) { rootCause = new javax.faces.application.ViewExpiredException(viewId); } } return rootCause; }
@Override public String deriveViewId(FacesContext context, String rawViewId) { return delegate.deriveViewId(context, rawViewId); }
@Override public String deriveViewId(FacesContext facesContext, String s) { weaveDelegate(); return _delegate.deriveViewId(facesContext, s); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String input) { return getWrapped().deriveViewId(context, input); }
@Override public String deriveViewId(FacesContext context, String input) { return getWrapped().deriveViewId(context, input); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String requestViewId) { return getWrapped().deriveViewId(context, requestViewId); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String input) { return getWrapped().deriveViewId(context, input); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String requestViewId) { return getWrapped().deriveViewId(context, requestViewId); }
/** * * <p>The default behavior of this method is to * call {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} * on the wrapped {@link ViewHandler} object.</p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String requestViewId) { return getWrapped().deriveViewId(context, requestViewId); }
@Override public String deriveViewId(FacesContext context, String input) { return getGroovyDelegate().deriveViewId(context, input); }
/** * * <p> * The default behavior of this method is to call * {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} on the wrapped * {@link ViewHandler} object. * </p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String requestViewId) { return getWrapped().deriveViewId(context, requestViewId); }
/** * * <p> * The default behavior of this method is to call * {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} on the wrapped * {@link ViewHandler} object. * </p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String requestViewId) { return getWrapped().deriveViewId(context, requestViewId); }
/** * * <p> * The default behavior of this method is to call * {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} on the wrapped * {@link ViewHandler} object. * </p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String requestViewId) { return getWrapped().deriveViewId(context, requestViewId); }
/** * * <p> * The default behavior of this method is to call * {@link ViewHandler#deriveViewId(javax.faces.context.FacesContext, String)} on the wrapped * {@link ViewHandler} object. * </p> * * @see ViewHandler#deriveViewId(javax.faces.context.FacesContext, String) * @since 2.0 */ @Override public String deriveViewId(FacesContext context, String requestViewId) { return getWrapped().deriveViewId(context, requestViewId); }
/** * Canonicalize the given viewId, then pass that viewId to the next ViewHandler in the chain. */ @Override public String deriveViewId(final FacesContext context, final String rawViewId) { String canonicalViewId = new URLDuplicatePathCanonicalizer().canonicalize(rawViewId); return parent.deriveViewId(context, canonicalViewId); }
@Override public UIViewRoot restoreView(FacesContext ctx, String viewId) { UIViewRoot viewRoot =viewHandler.restoreView(ctx, viewId); if (viewRoot != null) { viewRoot.setViewId(viewHandler.deriveViewId(ctx,viewId)); } return viewRoot; }
/** * Canonicalize the given viewId, then pass that viewId to the next ViewHandler in the chain. */ @Override public String deriveViewId(final FacesContext context, final String rawViewId) { String canonicalViewId = new URLDuplicatePathCanonicalizer().canonicalize(rawViewId); return parent.deriveViewId(context, canonicalViewId); }
/** * Canonicalize the given viewId, then pass that viewId to the next ViewHandler in the chain. */ @Override public String deriveViewId(final FacesContext context, final String rawViewId) { String canonicalViewId = new URLDuplicatePathCanonicalizer().canonicalize(rawViewId); return parent.deriveViewId(context, canonicalViewId); }
/** * Builds the view if not already available. This is mostly required for ViewExpiredException's. * * @param context The {@link FacesContext}. * @param throwable The occurred {@link Throwable}. * @param rootCause The root cause. * @return The unwrapped {@link Throwable}. * @throws java.io.IOException If building the view fails. */ protected Throwable buildView(FacesContext context, Throwable throwable, Throwable rootCause) throws IOException { if (context.getViewRoot() == null) { ViewHandler viewHandler = context.getApplication().getViewHandler(); String viewId = viewHandler.deriveViewId(context, ComponentUtils.calculateViewId(context)); ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(context, viewId); UIViewRoot viewRoot = vdl.createView(context, viewId); context.setViewRoot(viewRoot); vdl.buildView(context, viewRoot); // Workaround for Mojarra // if UIViewRoot == null -> 'IllegalArgumentException' is throwed instead of 'ViewExpiredException' if (rootCause == null && throwable instanceof IllegalArgumentException) { rootCause = new javax.faces.application.ViewExpiredException(viewId); } } return rootCause; }
viewIdToTest = viewHandler.deriveViewId(context, viewIdToTest); if (null != viewIdToTest) { result = new CaseStruct();