Package org.apache.wicket.page

Examples of org.apache.wicket.page.IManageablePage


    SerializedPage result = null;

    if (object instanceof IManageablePage)
    {
      IManageablePage page = (IManageablePage)object;
      result = serializedPagesCache.getPage(sessionId, page.getPageId());
      if (result == null)
      {
        result = serializePage(sessionId, page);
        if (result != null)
        {
          serializedPagesCache.storePage(result);
        }
      }
    }
    else if (object instanceof SerializedPage)
    {
      SerializedPage page = (SerializedPage)object;
      if (page.getData() == null)
      {
        result = restoreStrippedSerializedPage(page);
      }
      else
      {
View Full Code Here


   * @param data
   * @return page data deserialized
   */
  protected IManageablePage deserializePage(final byte[] data)
  {
    IManageablePage page = (IManageablePage)pageSerializer.deserialize(data);
    return page;
  }
View Full Code Here

   */
  public InspectorPage(final PageParameters parameters)
  {
    add(new ApplicationView("application", Application.get()));
    add(new SessionView("session", Session.get()));
    IManageablePage page = null;
    try
    {
      final int pageId = parameters.get("pageId").toInt();
      page = Session.get().getPageManager().getPage(pageId);
    }
View Full Code Here

   *
   * @see org.apache.wicket.request.mapper.IPageSource#getPageInstance(int)
   */
  public IRequestablePage getPageInstance(final int pageId)
  {
    IManageablePage manageablePage = Session.get().getPageManager().getPage(pageId);
    IRequestablePage requestablePage = null;
    if (manageablePage instanceof IRequestablePage)
    {
      requestablePage = (IRequestablePage)manageablePage;
    }
View Full Code Here

    SerializedPage result = null;

    if (object instanceof IManageablePage)
    {
      IManageablePage page = (IManageablePage)object;
      result = serializedPagesCache.getPage(sessionId, page.getPageId());
      if (result == null)
      {
        result = serializePage(sessionId, page);
        if (result != null)
        {
          serializedPagesCache.storePage(result);
        }
      }
    }
    else if (object instanceof SerializedPage)
    {
      SerializedPage page = (SerializedPage)object;
      if (page.getData() == null)
      {
        result = restoreStrippedSerializedPage(page);
      }
      else
      {
View Full Code Here

   * @param data
   * @return page data deserialized
   */
  protected IManageablePage deserializePage(final byte[] data)
  {
    IManageablePage page = (IManageablePage)pageSerializer.deserialize(data);
    return page;
  }
View Full Code Here

    tester.assertRenderedPage(TargetPage.class);
    int targetPageId = tester.getLastRenderedPage().getPageId();

    Assert.assertTrue(mainPageId != targetPageId);

    IManageablePage mainPage = tester.getSession().getPageManager().getPage(mainPageId);
    IManageablePage targetPage = tester.getSession().getPageManager().getPage(targetPageId);

    Assert.assertTrue(mainPage instanceof MainPage);
    Assert.assertTrue(targetPage instanceof TargetPage);
  }
View Full Code Here

    SerializedPage result = null;

    if (object instanceof IManageablePage)
    {
      IManageablePage page = (IManageablePage)object;
      result = serializedPagesCache.getPage(sessionId, page.getPageId());
      if (result == null)
      {
        result = serializePage(sessionId, page);
        serializedPagesCache.storePage(result);
      }
    }
    else if (object instanceof SerializedPage)
    {
      SerializedPage page = (SerializedPage)object;
      if (page.getData() == null)
      {
        result = restoreStrippedSerializedPage(page);
      }
      else
      {
View Full Code Here

    {
      return (IManageablePage)page;
    }
    else if (page instanceof byte[])
    {
      IManageablePage deserializePage = deserializePage((byte[]) page);
      return deserializePage;
    }

    String type = page != null ? page.getClass().getName() : null;
    throw new IllegalArgumentException("Unknown object type " + type);
View Full Code Here

        }
        return value;
    }

    private IManageablePage getPage(PageInfo info) {
        IManageablePage page;

        if (/*Strings.isEmpty(info.getPageMapName()) &&*/ Application.exists()
                /*&& Application.get().getSessionSettings().isPageIdUniquePerSession()*/) {
            page = Session.get().getPageManager().getPage(info.getPageId()/*,
                    info.getVersionNumber() != null ? info.getVersionNumber() : 0*/);
 
View Full Code Here

TOP

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

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.