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

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


      @Override
      protected void populateItem(ListItem item) {

        final SubSegment subSegment = (SubSegment) item.getModelObject();

        PageLink link = new PageLink("link", new IPageLink() {

          private static final long serialVersionUID = -465660455825345856L;

          public Page getPage() {
           
            return(new SubSegmentDetails(subSegment));
          }

          public Class<?> getPageIdentity() {
           
            return(SubSegmentDetails.class);
          }
         
        });
       
        link.add(new Label("id", subSegment.getId().toString()));
        link.add(new Label("name", subSegment.getName()));
        item.add(link);
      }
    });
  }
View Full Code Here


      @Override
      protected void populateItem(ListItem item) {

        final Authority authority = (Authority) item.getModelObject();

        PageLink link = new PageLink("link", new IPageLink() {

          private static final long serialVersionUID = 8137543413717092367L;

          public Page getPage() {
           
            return(new AuthorityDetails(authority));
          }

          public Class<?> getPageIdentity() {
           
            return(AuthorityDetails.class);
          }
        });
       
        link.add(new Label("id", authority.getId().toString()));
        item.add(link);
      }
    });
  }
View Full Code Here

        link.add(new Label("qxri", qxri));
        item.add(link);
      }
    });

    this.add(new PageLink("createSubSegmentLink", new IPageLink() {

      private static final long serialVersionUID = 2192286434779574430L;

      public Page getPage() {

        return(new CreateSubSegment(AuthorityDetails.this.authority));
      }

      public Class<?> getPageIdentity() {

        return(CreateSubSegment.class);
      }
    }));

    this.add(new PageLink("createAliasSubSegmentLink", new IPageLink() {

      private static final long serialVersionUID = -1394803236007989039L;

      public Page getPage() {

        return(new CreateAliasSubSegment(AuthorityDetails.this.authority));
      }

      public Class<?> getPageIdentity() {

        return(CreateAliasSubSegment.class);
      }
    }));

    this.add(new ListView("subSegments") {

      private static final long serialVersionUID = 8793019471745319174L;

      @Override
      protected void populateItem(ListItem item) {

        final SubSegment subSegment = (SubSegment) item.getModelObject();

        PageLink link = new PageLink("link", new IPageLink() {

          private static final long serialVersionUID = 4182879013901656829L;

          public Page getPage() {

            return(new SubSegmentDetails(subSegment));
          }

          public Class<?> getPageIdentity() {

            return(SubSegmentDetails.class);
          }
        });
        link.add(new Label("name", subSegment.getName()));
        item.add(link);
      }
    });
    this.add(new ListView("childSubSegments") {

      private static final long serialVersionUID = 1273612869821409740L;

      @Override
      protected void populateItem(ListItem item) {

        final SubSegment subSegment = (SubSegment) item.getModelObject();

        PageLink link = new PageLink("link", new IPageLink() {

          private static final long serialVersionUID = -1232152334705755201L;

          public Page getPage() {

            return(new SubSegmentDetails(subSegment));
          }

          public Class<?> getPageIdentity() {

            return(SubSegmentDetails.class);
          }
        });
        link.add(new Label("name", subSegment.getName()));
        item.add(link);
      }
    });
    this.add(new XrdForm("xrdForm"));
    this.add(new TemplateForm("templateForm"));
    this.add(new AttributesForm("attributesForm"));
    this.add(new IndexForm("indexForm"));
    this.add(new MountForm("mountForm"));
    this.add(new UnmountForm("unmountForm"));
    this.add(new DeleteForm("deleteForm"));
    this.add(new PageLink("backLink", Index.class));
  }
View Full Code Here

    this.setTitle(this.getString("title"));

    // create and add components

    this.add(new CreateRootNamespaceForm("createRootNamespaceForm"));
    this.add(new PageLink("backLink", Index.class));
  }
View Full Code Here

   *            expected page class to link
   * @return
   */
  public Result isPageLink(String path, Class expectedPageClass)
  {
    PageLink pageLink = (PageLink)getComponentFromLastRenderedPage(path);
    try
    {
      Field iPageLinkField = pageLink.getClass().getDeclaredField("pageLink");
      iPageLinkField.setAccessible(true);
      IPageLink iPageLink = (IPageLink)iPageLinkField.get(pageLink);
      return isEqual(expectedPageClass, iPageLink.getPageIdentity());
    }
    catch (SecurityException e)
View Full Code Here

   *            expected page class to link
   * @return a <code>Result</code>
   */
  public Result isPageLink(String path, Class expectedPageClass)
  {
    PageLink pageLink = (PageLink)getComponentFromLastRenderedPage(path);
    try
    {
      Field iPageLinkField = pageLink.getClass().getDeclaredField("pageLink");
      iPageLinkField.setAccessible(true);
      IPageLink iPageLink = (IPageLink)iPageLinkField.get(pageLink);
      return isEqual(expectedPageClass, iPageLink.getPageIdentity());
    }
    catch (SecurityException e)
View Full Code Here

   *            The id of the book that the page will edit
   * @return The page link
   */
  public static PageLink link(final String name, final long id)
  {
    return new PageLink(name, new IPageLink()
    {
      public Page getPage()
      {
        return new EditBook(Book.get(id));
      }
View Full Code Here

   *            expected page class to link
   * @return
   */
  public Result isPageLink(String path, Class expectedPageClass)
  {
    PageLink pageLink = (PageLink)getComponentFromLastRenderedPage(path);
    try
    {
      Field iPageLinkField = pageLink.getClass().getDeclaredField("pageLink");
      iPageLinkField.setAccessible(true);
      IPageLink iPageLink = (IPageLink)iPageLinkField.get(pageLink);
      return isEqual(expectedPageClass, iPageLink.getPageIdentity());
    }
    catch (SecurityException e)
View Full Code Here

    // 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<? extends Page> 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"));
      }
View Full Code Here

    // will be kept as session data. Instead, we use the more verbose
    // IPageLink
    // anonymous class, which will create the page instance only when
    // needed.

    add(new PageLink("pageLink", new IPageLink()
    {
      public Page getPage()
      {
        return new NonBookmarkablePage(PageLinkPage.this);
      }
View Full Code Here

TOP

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

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.