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

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


       * If the link is a bookmarkable link, then we need to transfer the
       * parameters to the next request.
       */
      if (link instanceof BookmarkablePageLink)
      {
        BookmarkablePageLink bookmarkablePageLink = (BookmarkablePageLink)link;
        try
        {
          Field parametersField = BookmarkablePageLink.class
              .getDeclaredField("parameters");
          parametersField.setAccessible(true);
View Full Code Here


   *            Name of link
   * @return Link to home page for this application
   */
  protected final BookmarkablePageLink homePageLink(final String id)
  {
    return new BookmarkablePageLink(id, getApplication().getHomePage());
  }
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

   * @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>(book)));
    }
    else
    {
      link.add(new Label("title", noBookTitle));
      link.setEnabled(false);
    }

    return link;
  }
View Full Code Here

  /**
   * Construct.
   */
  public BasePage()
  {
    add(new BookmarkablePageLink("home-link", HomePage.class));
  }
View Full Code Here

   *            Name of link
   * @return Link to home page for this application
   */
  protected final BookmarkablePageLink homePageLink(final String id)
  {
    return new BookmarkablePageLink(id, getApplication().getHomePage());
  }
View Full Code Here

   *            Name of link
   * @return Link to home page for this application
   */
  protected final BookmarkablePageLink homePageLink(final String id)
  {
    return new BookmarkablePageLink(id, getApplication().getHomePage());
  }
View Full Code Here

       * If the link is a bookmarkable link, then we need to transfer the parameters to the
       * next request.
       */
      if (link instanceof BookmarkablePageLink)
      {
        BookmarkablePageLink bookmarkablePageLink = (BookmarkablePageLink)link;
        try
        {
          Field parametersField = BookmarkablePageLink.class.getDeclaredField("parameters");
          Method getParametersMethod = BookmarkablePageLink.class.getDeclaredMethod(
            "getPageParameters", null);
View Full Code Here

   *            Name of link
   * @return Link to home page for this application
   */
  protected final BookmarkablePageLink homePageLink(final String id)
  {
    return new BookmarkablePageLink(id, getApplication().getHomePage());
  }
View Full Code Here

       * If the link is a bookmarkable link, then we need to transfer the
       * parameters to the next request.
       */
      if (link instanceof BookmarkablePageLink)
      {
        BookmarkablePageLink bookmarkablePageLink = (BookmarkablePageLink)link;
        try
        {
          Field parametersField = BookmarkablePageLink.class
              .getDeclaredField("parameters");
          parametersField.setAccessible(true);
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.