Register the toadlet itself for the link-enabled callback.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 11:51:31 +0000 (13:51 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 11:51:31 +0000 (13:51 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java

index 42c234e..8063019 100644 (file)
@@ -149,7 +149,7 @@ public class WebInterface extends AbstractService {
                for (PageToadlet toadlet : pageToadlets) {
                        String menuName = toadlet.getMenuName();
                        if (menuName != null) {
-                               toadletContainer.register(toadlet, "Navigation.Menu.Name", toadlet.path(), true, "Navigation.Menu.Item." + menuName + ".Name", "Navigation.Menu.Item." + menuName + ".Tooltip", false, new AlwaysEnabledCallback());
+                               toadletContainer.register(toadlet, "Navigation.Menu.Name", toadlet.path(), true, "Navigation.Menu.Item." + menuName + ".Name", "Navigation.Menu.Item." + menuName + ".Tooltip", false, toadlet);
                        } else {
                                toadletContainer.register(toadlet, null, toadlet.path(), true, false);
                        }