public class MyPage extends WebPage
{
	public MyPage()
	{
		List linkPropertyList = new LinkedList();
		linkPropertyList.add(new LinkProperty("My homepage", MyPage.class));
		linkPropertyList.add(new LinkProperty("Google page", "www.google.com"));
		linkPropertyList.add(new LinkProperty("My homepage again", MyPage.class));
		
		ListView leftMenuListView = new ListView("leftmenu", linkPropertyList)
		{
			protected void populateItem(final ListItem item)
			{
				LinkProperty linkProperty = (LinkProperty) item.getModelObject();
				if(linkProperty.isPageLink())
				{
					Link link = new BookmarkablePageLink("link", linkProperty.getPageLinkClass());
					link.add(new Label("linkName", linkProperty.getLinkName()));
					item.add(link);
				}
				else
				{
					WebMarkupContainer externalLink = new ExternalLink("link", linkProperty.getExternalUrl());
					externalLink.add(new Label("linkName", linkProperty.getExternalUrl()));
					item.add(externalLink);
				}
			}
		};
		add(leftMenuListView);
	}
}












