Author: ldywicki Date: Mon Aug 15 20:29:42 2011 New Revision: 1157990 URL: http://svn.apache.org/viewvc?rev=1157990&view=rev Log: Sidebar links in osgi home page. Updated details link - now it is bookmarkable
Modified: karaf/sandbox/pieber/karaf-webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/HomePage.java Modified: karaf/sandbox/pieber/karaf-webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/HomePage.java URL: http://svn.apache.org/viewvc/karaf/sandbox/pieber/karaf-webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/HomePage.java?rev=1157990&r1=1157989&r2=1157990&view=diff ============================================================================== --- karaf/sandbox/pieber/karaf-webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/HomePage.java (original) +++ karaf/sandbox/pieber/karaf-webconsole/trunk/osgi/src/main/java/org/apache/karaf/webconsole/osgi/internal/HomePage.java Mon Aug 15 20:29:42 2011 @@ -9,6 +9,7 @@ import org.apache.karaf.webconsole.core. import org.apache.wicket.PageParameters; import org.apache.wicket.behavior.SimpleAttributeModifier; import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.markup.html.link.BookmarkablePageLink; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.list.ListItem; import org.apache.wicket.markup.html.list.ListView; @@ -140,20 +141,17 @@ public class HomePage extends BasePage { } item.add(new SimpleAttributeModifier("class", classes.toString())); - item.add(new Link("link") { - @Override - public void onClick() { - PageParameters params = new PageParameters(); - params.put("bundleId", bundle.getBundleId()); - setResponsePage(new DetailsPage(params)); - } - }); + + + PageParameters params = new PageParameters(); + params.put("bundleId", bundle.getBundleId()); + + item.add(new BookmarkablePageLink<DetailsPage>("link", DetailsPage.class, params)); } }); } - /* @Override protected List<Class> getSubPages() { List<Class> subpages = new LinkedList<Class>(); @@ -161,5 +159,5 @@ public class HomePage extends BasePage { subpages.add(EventsPage.class); return subpages; } - */ + }