package jp.sourceforge.manganetwork.page;\r
\r
-import org.apache.wicket.markup.html.WebPage;\r
+import org.apache.wicket.markup.html.link.PageLink;\r
\r
-public class MenuApplicationPage extends WebPage {\r
\r
+public class MenuApplicationPage extends ApplicationPage {\r
+\r
+ public MenuApplicationPage()\r
+ {\r
+ PageLink loginLink = createPageLink("loginLink", HomePage.class);\r
+ PageLink logoutLink = createPageLink("logoutLink", HomePage.class);\r
+ if (getLoginUser() != null)\r
+ {\r
+ loginLink.setVisible(false);\r
+ logoutLink.setVisible(true);\r
+ }\r
+ else\r
+ {\r
+ loginLink.setVisible(true);\r
+ logoutLink.setVisible(false);\r
+ }\r
+ \r
+ add(loginLink);\r
+ add(logoutLink);\r
+ }\r
+\r
+ private PageLink createPageLink(String id, Class pageClass) {\r
+ return new PageLink(id, pageClass);\r
+ }\r
}\r