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