Package org.apache.wicket.markup.html.link

Examples of org.apache.wicket.markup.html.link.BookmarkablePageLink


  public InspectorBug(final String id, final WebPage page)
  {
    super(id);
    PageParameters parameters = new PageParameters();
    parameters.put("pageId", page.getId());
    Link link =  new BookmarkablePageLink("link", InspectorPage.class, parameters);
    link.add(new Image("bug"));
    add(link);
  }
View Full Code Here


   * @return The external page link
   */
  public static BookmarkablePageLink link(final String name, final Book book,
      final String noBookTitle)
  {
    final BookmarkablePageLink link = new BookmarkablePageLink(name, BookDetails.class);

    if (book != null)
    {
      link.setParameter("id", book.getId());
      link.add(new Label("title", new Model(book)));
    }
    else
    {
      link.add(new Label("title", noBookTitle));
      link.setEnabled(false);
    }

    return link;
  }
View Full Code Here

    add(new Label("messageLabel", message));

    // Add a link back. We did not hold any important instance data in
    // BookMarkabelPageLinkPage,
    // so navigating to a new instance is just fine
    add(new BookmarkablePageLink("navigateBackLink", BookmarkablePageLinkPage.class));
  }
View Full Code Here

    // public default
    // constructor and/ or a constructor with a PageParameters argument

    // Here, we add a link to a bookmarkable page without passing any
    // parameters
    add(new BookmarkablePageLink("pageLinkNoArgs", BookmarkablePage.class));

    // And here, we add a link to a bookmarkable page with passing a
    // parameter that holds
    // the message that is to be displayed in the page we address.
    // Note that any arguments are passed as request parameters, and should
    // thus be strings
    PageParameters parameters = new PageParameters();
    parameters.put("message", "This message was passed as a page parameter argument");
    add(new BookmarkablePageLink("pageLinkWithArgs", BookmarkablePage.class, parameters));
  }
View Full Code Here

      {
        final Access 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)
View Full Code Here

  /**
   * Constructor
   */
  public BasePage()
  {
    add(new BookmarkablePageLink("back", Index.class).setAutoEnable(true));
  }
View Full Code Here

    add(actionOnClickLink);
    add(new Label("onClickLinkClickCount", new PropertyModel(this, "onClickLinkClickCount")));

    // Link to Page1 is a simple external page link
    add(new BookmarkablePageLink("page1Link", Page1.class));

    // Link to Page2 is automaticLink, so no code
    // Link to Page3 is an external link which takes a parameter
    add(new BookmarkablePageLink("page3Link", Page3.class).setParameter("bookmarkparameter",
        "3++2 & 5 � >< space + �"));

    // Link to BookDetails page
    add(new PageLink("bookDetailsLink", new IPageLink()
    {
      public Page getPage()
      {
        return new BookDetails(new Book("The Hobbit"));
      }

      public Class getPageIdentity()
      {
        return BookDetails.class;
      }
    }));

    // Delayed link to BookDetails page
    add(new PageLink("bookDetailsLink2", new IPageLink()
    {
      public Page getPage()
      {
        return new BookDetails(new Book("Inside The Matrix"));
      }

      public Class getPageIdentity()
      {
        return BookDetails.class;
      }
    }));

    // Image map link example
    add(new ImageMap("imageMap").addRectangleLink(0, 0, 100, 100,
        new BookmarkablePageLink("page1", Page1.class)).addCircleLink(160, 50, 35,
        new BookmarkablePageLink("page2", Page2.class)).addPolygonLink(
        new int[] { 212, 79, 241, 4, 279, 54, 212, 79 },
        new BookmarkablePageLink("page3", Page3.class)));

    // Popup example
    PopupSettings popupSettings = new PopupSettings(PageMap.forName("popuppagemap")).setHeight(
        500).setWidth(500);
    add(new BookmarkablePageLink("popupLink", Popup.class).setPopupSettings(popupSettings));

    // Popup example
    add(new BookmarkablePageLink("popupButtonLink", Popup.class).setPopupSettings(popupSettings));

    // External site link
    add(new ExternalLink("google", "http://www.google.com", "Click this link to go to Google"));

    // And that link as a popup
View Full Code Here

        }.add(new Label("userId", new Model(user))));
      }
    });

    // pages that are protected using wicket meta data
    add(new BookmarkablePageLink("adminBookmarkableLink", AdminBookmarkablePage.class));
    add(new Link("adminInternalLink")
    {
      @Override
      public void onClick()
      {
        setResponsePage(new AdminInternalPage("foo"));
      }
    });
    add(new BookmarkablePageLink("panelsPageLink", PanelsPage.class));

    // pages that are protected using annotations
    add(new BookmarkablePageLink("adminAnnotBookmarkableLink", AdminAnnotationsBookmarkablePage.class));
    add(new Link("adminAnnotInternalLink")
    {
      @Override
      public void onClick()
      {
        setResponsePage(new AdminAnnotationsInternalPage("bar"));
      }
    });
    add(new BookmarkablePageLink("panelsAnnotPageLink", AnnotationsPanelsPage.class));
  }
View Full Code Here

      {
        tree.getTreeState().collapseAll();
      }
    });

    add(new BookmarkablePageLink("ajaxTreeLink", SimpleTreePage.class));
  }
View Full Code Here

*
* @author Igor Vaynberg (ivaynberg)
*/
public class BasePage extends WebPage {
  public BasePage() {
    add(new BookmarkablePageLink("home-link", HomePage.class));
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.link.BookmarkablePageLink

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.