Package org.apache.wicket.page

Examples of org.apache.wicket.page.IPageManager


        else
        {
          session = oldSession;
        }

        IPageManager pageManager = session.getPageManager();
        try
        {
          Page page = getPage(pageManager);

          WebSocketRequestHandler requestHandler = new WebSocketRequestHandler(page, connection);

          WebSocketPayload payload = createEventPayload(message, requestHandler);

          sendPayload(payload, page);

          if (!(message instanceof ConnectedMessage || message instanceof ClosedMessage))
          {
            requestHandler.respond(requestCycle);
          }
        }
        finally
        {
          pageManager.commitRequest();
        }
      }
      catch (Exception x)
      {
        LOG.error("An error occurred during processing of a WebSocket message", x);
View Full Code Here


        else
        {
          session = oldSession;
        }

        IPageManager pageManager = session.getPageManager();
        try
        {
          Page page = (Page) pageManager.getPage(pageId);
          WebSocketRequestHandler requestHandler = new WebSocketRequestHandler(page, connection);

          WebSocketPayload payload = createEventPayload(message, requestHandler);

          page.send(application, Broadcast.BREADTH, payload);

          if (!(message instanceof ConnectedMessage || message instanceof ClosedMessage))
          {
            requestHandler.respond(requestCycle);
          }
        }
        finally
        {
          pageManager.commitRequest();
        }
      }
      catch (Exception x)
      {
        LOG.error("An error occurred during processing of a WebSocket message", x);
View Full Code Here

        else
        {
          session = oldSession;
        }

        IPageManager pageManager = session.getPageManager();
        try
        {
          Page page = (Page) pageManager.getPage(pageId);
          WebSocketRequestHandler requestHandler = new WebSocketRequestHandler(page, connection);

          WebSocketPayload payload = createEventPayload(message, requestHandler);

          page.send(application, Broadcast.BREADTH, payload);

          if (!(message instanceof ConnectedMessage || message instanceof ClosedMessage))
          {
            requestHandler.respond(requestCycle);
          }
        }
        finally
        {
          pageManager.commitRequest();
        }
      }
      catch (Exception x)
      {
        LOG.error("An error occurred during processing of a WebSocket message", x);
View Full Code Here

    if (getFlag(FLAG_PREVENT_DIRTY))
    {
      return;
    }

    final IPageManager pageManager = getSession().getPageManager();
    if (!getFlag(FLAG_IS_DIRTY) && isVersioned() && pageManager.supportsVersioning())
    {
      setFlag(FLAG_IS_DIRTY, true);
      setNextAvailableId();
      pageManager.touchPage(this);
    }
    else if (isInitialization)
    {
      // we need to get pageId for new page instances even when the page doesn't need
      // versioning, otherwise pages override each other in the page store and back button
View Full Code Here

    if (getFlag(FLAG_PREVENT_DIRTY))
    {
      return;
    }

    final IPageManager pageManager = getSession().getPageManager();
    if (!getFlag(FLAG_IS_DIRTY) && (isVersioned() && pageManager.supportsVersioning() ||

    // we need to get pageId for new page instances even when the page doesn't need
    // versioning, otherwise pages override each other in the page store and back button
    // support is broken
      isInitialization))
    {
      setFlag(FLAG_IS_DIRTY, true);
      setNextAvailableId();
      pageManager.touchPage(this);
    }
  }
View Full Code Here

    if (getFlag(FLAG_PREVENT_DIRTY))
    {
      return;
    }

    final IPageManager pageManager = getSession().getPageManager();
    if (!getFlag(FLAG_IS_DIRTY) && isVersioned() && pageManager.supportsVersioning())
    {
      setFlag(FLAG_IS_DIRTY, true);
      setNextAvailableId();
      pageManager.touchPage(this);
    }
    else if (isInitialization)
    {
      // we need to get pageId for new page instances even when the page doesn't need
      // versioning, otherwise pages override each other in the page store and back button
View Full Code Here

   * @param pageManager
   * @param versioningPage
   */
  private void checkPageVersionsAreStored(Page versioningPage)
  {
    IPageManager pageManager = wicketTester.getApplication().getPageManager();

    int lastPageId = versioningPage.getPageId();
    while (lastPageId >= 0)
    {
      assertNotNull(pageManager.getPage(lastPageId));
      lastPageId--;
    }
  }
View Full Code Here

    if (getFlag(FLAG_PREVENT_DIRTY))
    {
      return;
    }

    final IPageManager pageManager = getSession().getPageManager();
    if (!getFlag(FLAG_IS_DIRTY) && isVersioned() && pageManager.supportsVersioning())
    {
      setFlag(FLAG_IS_DIRTY, true);
      setNextAvailableId();
      pageManager.touchPage(this);
    }
    else if (isInitialization)
    {
      // we need to get pageId for new page instances even when the page doesn't need
      // versioning, otherwise pages override each other in the page store and back button
View Full Code Here

   *
   * @param versioningPage
   */
  private void checkPageVersionsAreStored(Page versioningPage)
  {
    IPageManager pageManager = wicketTester.getApplication().getPageManager();

    int lastPageId = versioningPage.getPageId();
    while (lastPageId >= 0)
    {
      assertNotNull(pageManager.getPage(lastPageId));
      lastPageId--;
    }
  }
View Full Code Here

   *
   * @return {@link IPageManager} instance.
   */
  public final IPageManager getPageManager()
  {
    IPageManager pageManager = Application.get().internalGetPageManager();
    return pageAccessSynchronizer.get().adapt(pageManager);
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.page.IPageManager

Copyright © 2018 www.massapicom. 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.