Package org.apache.wicket

Examples of org.apache.wicket.IPageMap


          {
            // this request has indeed been flagged as
            // process-only-if-path-is-active

            Session session = Session.get();
            IPageMap pageMap = session.pageMapForName(
              requestParameters.getPageMapName(), false);
            if (pageMap == null)
            {
              // requested pagemap no longer exists - ignore this
              // request
View Full Code Here


    {
      IRequestTarget currentTarget = requestCycle.getRequestTarget();
      if (currentTarget instanceof IPageRequestTarget)
      {
        Page currentPage = ((IPageRequestTarget)currentTarget).getPage();
        final IPageMap pageMap = currentPage.getPageMap();
        if (pageMap.isDefault())
        {
          pageMapName = "";
        }
        else
        {
          pageMapName = pageMap.getName();
        }
      }
      else
      {
        pageMapName = "";
View Full Code Here

    // Get component and page for request target
    final Component component = requestTarget.getTarget();
    final Page page = component.getPage();

    // Add pagemap
    final IPageMap pageMap = page.getPageMap();
    if (!pageMap.isDefault())
    {
      url.append(pageMap.getName());
    }
    url.append(Component.PATH_SEPARATOR);

    // Add path to component
    url.append(component.getPath());
View Full Code Here

   * @param component
   *            The component
   */
  public void setRequestToComponent(final Component component)
  {
    final IPageMap pageMap = component.getPage().getPageMap();
    final String pageMapName = pageMap.isDefault() ? "" : pageMap.getName();
    if (component instanceof BookmarkablePageLink)
    {
      final Class<? extends Page> clazz = ((BookmarkablePageLink<?>)component).getPageClass();
      parameters.put(WebRequestCodingStrategy.BOOKMARKABLE_PAGE_PARAMETER_NAME, pageMapName +
        ':' + clazz.getName());
View Full Code Here

      // should we cleanup the pagemap?
      if (deletePageMap == true)
      {
        // get the pagemap
        Session session = Session.get();
        IPageMap pageMap = session.pageMapForName(getPageMapName(), false);

        // if there is any remove it
        if (pageMap != null)
        {
          session.removePageMap(pageMap);
View Full Code Here

   * @param component
   *            The component
   */
  public void setRequestToComponent(final Component component)
  {
    final IPageMap pageMap = component.getPage().getPageMap();
    final String pageMapName = pageMap.isDefault() ? "" : pageMap.getName();
    if (component instanceof BookmarkablePageLink)
    {
      final Class clazz = ((BookmarkablePageLink)component).getPageClass();
      parameters.put(WebRequestCodingStrategy.BOOKMARKABLE_PAGE_PARAMETER_NAME, pageMapName +
        ':' + clazz.getName());
View Full Code Here

        String pageMapName;
        IRequestTarget currentTarget = cycle.getRequestTarget();
        if (currentTarget instanceof IPageRequestTarget)
        {
          Page currentPage = ((IPageRequestTarget)currentTarget).getPage();
          final IPageMap pageMap = currentPage.getPageMap();
          if (pageMap.isDefault())
          {
            pageMapName = "";
          }
          else
          {
            pageMapName = pageMap.getName();
          }
        }
        else
        {
          pageMapName = "";
View Full Code Here

      Page page = (Page)value;
      rd.addEntry("Page removed, id: " + page.getId() + ", class:" + page.getClass());
    }
    else if (value instanceof IPageMap)
    {
      IPageMap map = (IPageMap)value;
      rd.addEntry("PageMap removed, name: " +
        (map.getName() == null ? "DEFAULT" : map.getName()));
    }
    else if (value instanceof WebSession)
    {
      rd.addEntry("Session removed");
    }
View Full Code Here

      Page page = (Page)value;
      rd.addEntry("Page updated, id: " + page.getId() + ", class:" + page.getClass());
    }
    else if (value instanceof IPageMap)
    {
      IPageMap map = (IPageMap)value;
      rd.addEntry("PageMap updated, name: " +
        (map.getName() == null ? "DEFAULT" : map.getName()));
    }
    else if (value instanceof Session)
    {
      rd.addEntry("Session updated");
    }
View Full Code Here

      Page page = (Page)value;
      rd.addEntry("Page created, id: " + page.getId() + ", class:" + page.getClass());
    }
    else if (value instanceof IPageMap)
    {
      IPageMap map = (IPageMap)value;
      rd.addEntry("PageMap created, name: " +
        (map.getName() == null ? "DEFAULT" : map.getName()));
    }
    else
    {
      rd.addEntry("Custom object created: " + value);
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.IPageMap

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.