congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ViewExpiredException
Code IndexAdd Tabnine to your IDE (free)

How to use
ViewExpiredException
in
javax.faces.application

Best Java code snippets using javax.faces.application.ViewExpiredException (Showing top 20 results out of 315)

origin: primefaces/primefaces

/**
 * 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;
}
origin: imixs/imixs-workflow

requestMap.put("currentViewId", vee.getViewId());
origin: stackoverflow.com

try {
  fc.getExternalContext().getFlash().put("expiredViewId", vee.getViewId());
origin: org.apache.myfaces.test/myfaces-test22

 public static void throwViewExpiredException(String viewId)
 {
  throw new ViewExpiredException(
    "The expected view was not returned for the view identifier: " + viewId, viewId);
 }
}
origin: org.apache.myfaces.extensions.cdi.bundles/myfaces-extcdi-bundle-jsf20

viewId = ((ViewExpiredException) throwable).getViewId();
origin: org.apache.myfaces.test/myfaces-test12

 public static void throwViewExpiredException(String viewId)
 {
  throw new ViewExpiredException(
    "The expected view was not returned for the view identifier: " + viewId, viewId);
 }
}
origin: org.icefaces/icefaces

String viewId = vex.getViewId();
origin: org.apache.myfaces.core.internal/myfaces-shaded-impl

throw new ViewExpiredException();
origin: org.apache.deltaspike.modules/deltaspike-jsf-module-impl-ee6

viewId = ((ViewExpiredException) throwable).getViewId();
origin: org.apache.myfaces.core/myfaces-impl

throw new ViewExpiredException();
origin: org.apache.deltaspike.modules/deltaspike-jsf-module-impl

viewId = ((ViewExpiredException) throwable).getViewId();
origin: org.apache.myfaces.core/myfaces-shaded-impl

throw new ViewExpiredException();
origin: org.apache.myfaces.shared/myfaces-shared-core

throw new ViewExpiredException();
origin: org.primefaces/primefaces

/**
 * 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;
}
origin: org.apache.myfaces/com.springsource.org.apache.myfaces

if (viewRoot == null)
  throw new ViewExpiredException("The expected view was not returned " + "for the view identifier: "
      + viewId, viewId);
origin: javax.faces/jsf-impl

} else {
  Object[] params = {viewId};
  throw new ViewExpiredException(
     MessageUtils.getExceptionMessageString(
        MessageUtils.RESTORE_VIEW_ERROR_MESSAGE_ID,
origin: org.glassfish/jakarta.faces

throw new ViewExpiredException(
  getExceptionMessageString(RESTORE_VIEW_ERROR_MESSAGE_ID, params),
  viewId);
origin: eclipse-ee4j/mojarra

if (viewRoot == null) {
  Object[] params = {viewId};
  throw new ViewExpiredException(
    getExceptionMessageString(RESTORE_VIEW_ERROR_MESSAGE_ID, params),
    viewId);
origin: org.glassfish/javax.faces

throw new ViewExpiredException(
  getExceptionMessageString(RESTORE_VIEW_ERROR_MESSAGE_ID, params),
  viewId);
origin: com.sun.faces/jsf-impl

throw new ViewExpiredException(
    MessageUtils.getExceptionMessageString(
    MessageUtils.RESTORE_VIEW_ERROR_MESSAGE_ID,
javax.faces.applicationViewExpiredException

Javadoc

Implementations must throw this FacesException when attempting to restore the view StateManager#restoreView(javax.faces.context.FacesContext,String,String) results in failure on postback.

Most used methods

  • <init>
    Construct a new exception with the specified root cause. The detail message will be set to (cause ==
  • getViewId
    Return the view identifier of this exception, or null if the view identifier is nonexistent or unkno

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now