Package javax.faces.context

Examples of javax.faces.context.ExternalContext.redirect()


               
                // JSF 2.0 Spec call Flash.setRedirect(true) to notify Flash scope and take proper actions
                externalContext.getFlash().setRedirect(true);
                try
                {
                    externalContext.redirect(redirectPath);
                    facesContext.responseComplete();
                }
                catch (IOException e)
                {
                    throw new FacesException(e.getMessage(), e);
View Full Code Here


            ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
            String redirectPath = viewHandler.getActionURL(facesContext, targetViewId);

            try
            {
                externalContext.redirect(externalContext.encodeActionURL(redirectPath));
            }
            catch (IOException e)
            {
                throw new FacesException(e.getMessage(), e);
            }
View Full Code Here

                return true;
            }
           
            if (!externalContext.getRequestServletPath().endsWith("/")) {
                try {
                    externalContext.redirect(externalContext.getRequestServletPath() + "/");
                    facesContext.responseComplete();
                    return true;
                } catch (IOException e) {
                    throw new FacesException("redirect failed", e);
                }
View Full Code Here

        ViewHandler vh = context.getApplication().getViewHandler();

        String viewId = context.getViewRoot().getViewId();
        String redirect = vh.getActionURL(context, viewId);
        String encodedRedirect = ec.encodeActionURL(redirect);
        ec.redirect(encodedRedirect);
        if (_LOG.isFine())
        {
          _LOG.fine("Page navigation to {0} happened during a PPR request " +
                    "on {1};  Apache Trinidad is forcing a redirect.",
                    new String[]{viewId, originalRoot.getViewId()});
View Full Code Here

        return true;
      }

      if (!externalContext.getRequestServletPath().endsWith("/")) {
        try {
          externalContext.redirect(externalContext.getRequestServletPath() + "/");
          facesContext.responseComplete();
          return true;
        } catch (IOException e) {
          throw new FacesException("redirect failed", e);
        }
View Full Code Here

    HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
    if (session != null) {
      session.invalidate();
    }
    ExternalContext externalContext = facesContext.getExternalContext();
    externalContext.redirect(externalContext.getRequestContextPath());
    facesContext.responseComplete();
  }

  public TabChangeListener getTabChangeListener() {
    LOG.error("getTabChangeListener " + tabChangeListener);
View Full Code Here

    HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
    if (session != null) {
      session.invalidate();
    }
    ExternalContext externalContext = facesContext.getExternalContext();
    externalContext.redirect(externalContext.getRequestContextPath());
    facesContext.responseComplete();
  }

  public TabChangeListener getTabChangeListener() {
    LOG.error("getTabChangeListener " + tabChangeListener);
View Full Code Here

                ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
                String redirectPath = viewHandler.getActionURL(facesContext, navigationCase.getToViewId());

                try
                {
                    externalContext.redirect(externalContext.encodeActionURL(redirectPath));
                }
                catch (IOException e)
                {
                    throw new FacesException(e.getMessage(), e);
                }
View Full Code Here

    final HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
    if (session != null) {
      session.invalidate();
    }
    final ExternalContext externalContext = facesContext.getExternalContext();
    externalContext.redirect("/" + externalContext.getRequestContextPath());
    facesContext.responseComplete();
    return null;
  }

  public TabChangeListener getTabChangeListener() {
View Full Code Here

                return true;
            }
           
            if (!externalContext.getRequestServletPath().endsWith("/")) {
                try {
                    externalContext.redirect(externalContext.getRequestServletPath() + "/");
                    facesContext.responseComplete();
                    return true;
                } catch (IOException e) {
                    throw new FacesException("redirect failed", e);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.