Examples of PageProvider


Examples of org.apache.wicket.core.request.handler.PageProvider

   * @param page
   *            redirect page
   */
  public RestartResponseException(final IRequestablePage page)
  {
    this(new PageProvider(page), RedirectPolicy.AUTO_REDIRECT);
  }
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

   * @return a {@code IRequestHandler} capable of processing the bookmarkable request.
   */
  protected IRequestHandler processBookmarkable(Class<? extends IRequestablePage> pageClass,
    PageParameters pageParameters)
  {
    PageProvider provider = new PageProvider(pageClass, pageParameters);
    provider.setPageSource(getContext());
    return new RenderPageRequestHandler(provider);
  }
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

   */
  protected IRequestHandler processHybrid(PageInfo pageInfo,
    Class<? extends IRequestablePage> pageClass, PageParameters pageParameters,
    Integer renderCount)
  {
    PageProvider provider = new PageProvider(pageInfo.getPageId(), pageClass, pageParameters,
      renderCount);
    provider.setPageSource(getContext());
    return new RenderPageRequestHandler(provider);
  }
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

   * @return Page
   */
  @SuppressWarnings("unchecked")
  public <T extends Page> T startPage(final T page)
  {
    return (T)startPage(new PageProvider(page));
  }
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

    // must be null for Pages
    componentInPage = null;

    // prepare the request
    request.setUrl(application.getRootRequestMapper().mapHandler(
      new BookmarkablePageRequestHandler(new PageProvider(pageClass, parameters))));

    // process the request
    processRequest();

    // The last rendered page
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

    if (responseObject.containsPage())
    {
      // the page itself has been added to the request target, we simply issue a redirect
      // back to the page
      IRequestHandler handler = new RenderPageRequestHandler(new PageProvider(page));
      final String url = rc.urlFor(handler).toString();
      response.sendRedirect(url);
      return;
    }
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

   * @param waitBeforeRedirectInSeconds
   *            The number of seconds the browser should wait before redirecting
   */
  public RedirectPage(final Page page, final int waitBeforeRedirectInSeconds)
  {
    this(page.urlFor(new RenderPageRequestHandler(new PageProvider(page))),
      waitBeforeRedirectInSeconds);
  }
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

   *            Page parameters
   */
  public <C extends Page> InlineFrame(final String id, final Class<C> c,
    final PageParameters params)
  {
    this(id, new PageProvider(c, params));

    // Ensure that c is a subclass of Page
    if (!Page.class.isAssignableFrom(c))
    {
      throw new IllegalArgumentException("Class " + c + " is not a subclass of Page");
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

   * @param page
   *            The page
   */
  public InlineFrame(final String id, final Page page)
  {
    this(id, new PageProvider(page.getPageId(), page.getClass(), page.getRenderCount()));
  }
View Full Code Here

Examples of org.apache.wicket.core.request.handler.PageProvider

    if (e instanceof StalePageException)
    {
      // If the page was stale, just re-render it
      // (the url should always be updated by an redirect in that case)
      return new RenderPageRequestHandler(new PageProvider(((StalePageException)e).getPage()));
    }
    else if (e instanceof PageExpiredException)
    {
      return createPageRequestHandler(new PageProvider(Application.get()
        .getApplicationSettings()
        .getPageExpiredErrorPage()));
    }
    else if (e instanceof AuthorizationException ||
      e instanceof ListenerInvocationNotAllowedException)
    {
      return createPageRequestHandler(new PageProvider(Application.get()
        .getApplicationSettings()
        .getAccessDeniedPage()));
    }
    else if (e instanceof ResponseIOException)
    {
      logger.error("Connection lost, give up responding.", e);
      return new EmptyRequestHandler();
    }
    else if (e instanceof PackageResource.PackageResourceBlockedException && application.usesDeploymentConfig())
    {
      logger.debug(e.getMessage(), e);
      return new ErrorCodeRequestHandler(404);
    }
    else
    {

      final ExceptionSettings.UnexpectedExceptionDisplay unexpectedExceptionDisplay = application.getExceptionSettings()
        .getUnexpectedExceptionDisplay();

      logger.error("Unexpected error occurred", e);

      if (ExceptionSettings.SHOW_EXCEPTION_PAGE.equals(unexpectedExceptionDisplay))
      {
        Page currentPage = extractCurrentPage();
        return createPageRequestHandler(new PageProvider(new ExceptionErrorPage(e,
          currentPage)));
      }
      else if (ExceptionSettings.SHOW_INTERNAL_ERROR_PAGE.equals(unexpectedExceptionDisplay))
      {
        return createPageRequestHandler(new PageProvider(
          application.getApplicationSettings().getInternalErrorPage()));
      }
      else
      {
        // IExceptionSettings.SHOW_NO_EXCEPTION_PAGE
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.