Examples of IPageMapEntry


Examples of org.apache.wicket.session.pagemap.IPageMapEntry

   *            The version to get
   * @return Any page having the given id
   */
  public final Page get(final int id, int versionNumber)
  {
    final IPageMapEntry entry = (IPageMapEntry)getSession().getAttribute(attributeForId(id));
    if (entry != null)
    {
      // Get page as dirty
      Page page = entry.getPage();

      // TODO Performance: Is this really the case is a page always dirty
      // even if we just render it again? POSSIBLE ANSWER: The page could
      // mark itself as clean to prevent replication, but the reverse is
      // probably not desirable (pages marking themselves dirty manually)
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

    // Page only goes into session if it is stateless
    if (!page.isPageStateless())
    {
      Session session = getSession();
      // Get page map entry from page
      final IPageMapEntry entry = page.getPageMapEntry();

      // Entry has been accessed
      pushAccess(entry);

      // Store entry in session
      final String attribute = attributeForId(entry.getNumericId());

      if (session.getAttribute(attribute) == null)
      {
        // Set attribute if it is a new page, so that it will exists
        // already for other threads that can come on the same time.
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

        {
          // Pop unreachable access off top of stack
          final Access topAccess = popAccess();

          // Get entry for access
          final IPageMapEntry top = getEntry(topAccess.getId());

          // If it's a page we can remove version info
          if (top instanceof Page)
          {
            // If there's more than one version
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

    {
      if (set)
      {
        Page.serializer.set(new PageSerializer(null));
      }
      IPageMapEntry entry = (IPageMapEntry)Objects.byteArrayToObject(bytes);
      if (entry != null)
      {
        page = entry.getPage();
        page = page.getVersion(versionNumber);
      }
    }
    finally
    {
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

  {
    long size = Objects.sizeof(this);
    Iterator it = getEntries().iterator();
    while (it.hasNext())
    {
      IPageMapEntry entry = (IPageMapEntry)it.next();
      if (entry instanceof Page)
      {
        size += ((Page)entry).getSizeInBytes();
      }
      else
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

  {
    long size = Objects.sizeof(this);
    Iterator<IPageMapEntry> it = getEntries().iterator();
    while (it.hasNext())
    {
      IPageMapEntry entry = it.next();
      if (entry instanceof Page)
      {
        size += ((Page)entry).getSizeInBytes();
      }
      else
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

       */
      @Override
      protected void populateItem(final ListItem<Access> listItem)
      {
        final Access access = listItem.getModelObject();
        IPageMapEntry entry = pageMap.getEntry(access.getId());
        PageParameters parameters = new PageParameters();
        parameters.put("pageId", "" + entry.getNumericId());
        Link link = new BookmarkablePageLink("link", InspectorPage.class, parameters);
        link.add(new Label("id", "" + entry.getNumericId()));
        listItem.add(link);
        listItem.add(new Label("class", "" + entry.getClass().getName()));
        long size;
        int versions;
        if (entry instanceof Page)
        {
          Page page = (Page)entry;
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

   */
  public InspectorPage(final PageParameters parameters)
  {
    add(new ApplicationView("application", Application.get()));
    add(new SessionView("session", Session.get()));
    IPageMapEntry entry = null;
    try
    {
      entry = getPageMap().getEntry(parameters.getInt("pageId"));
    }
    catch (StringValueConversionException e)
    {
      // Ignore
    }
    add(new PageView("page", entry == null ? null : entry.getPage()));
    add(new Image("bug"));
    add(new BookmarkablePageLink("allsessions", LiveSessionsPage.class));
    add(new Label("wicketVersion", getApplication().getFrameworkSettings().getVersion()));
  }
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

    {
      if (set)
      {
        Page.serializer.set(new PageSerializer(null));
      }
      IPageMapEntry entry = (IPageMapEntry)Objects.byteArrayToObject(data);
      if (entry != null)
      {
        page = entry.getPage();
        if (versionNumber != -1)
        {
          page = page.getVersion(versionNumber);
        }
      }
View Full Code Here

Examples of org.apache.wicket.session.pagemap.IPageMapEntry

   */
  public InspectorPage(final PageParameters parameters)
  {
    add(new ApplicationView("application", Application.get()));
    add(new SessionView("session", Session.get()));
    IPageMapEntry entry = null;
    try
    {
      entry = Session.get().pageMapForName(
          parameters.getString("pageMap").equals("") ? null : parameters.getString("pageMap"),
          false).getEntry(parameters.getInt("pageId"));
    }
    catch (StringValueConversionException e)
    {
      // Ignore
    }
    catch (NullPointerException e)
    {
            // Ignore
    }
    add(new PageView("page", entry == null ? null : entry.getPage()));
    add(new Image("bug"));
    add(new BookmarkablePageLink<Void>("allsessions", LiveSessionsPage.class));
    add(new Label("wicketVersion", getApplication().getFrameworkSettings().getVersion()));
  }
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.