protected Class<HomePage> getPageClass() {
return HomePage.class;
}
});
SubMenu subMenu = new SubMenu("Sub Menu 1");
menu.addItem(subMenu);
subMenu.addItem(new AjaxMenuItem("Very very very long link!") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setMessage(getDefaultModel().getObject().toString());
target.addComponent(SuperfishMenuPanel.this.context);
}
});
subMenu.addItem(new AjaxMenuItem("Link 1.1") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setMessage(getDefaultModel().getObject().toString());
target.addComponent(SuperfishMenuPanel.this.context);
}
});
subMenu.addItem(new AjaxMenuItem("Link 1.2") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setMessage(getDefaultModel().getObject().toString());
target.addComponent(SuperfishMenuPanel.this.context);
}
});
subMenu = new SubMenu("Sub Menu 2");
menu.addItem(subMenu);
SubMenu susSubMenu = new SubMenu("Sub Menu 2.1");
subMenu.addItem(susSubMenu);
susSubMenu.addItem(new AjaxMenuItem("link 2.1.1") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setMessage(getDefaultModel().getObject().toString());
target.addComponent(SuperfishMenuPanel.this.context);
}
});
susSubMenu.addItem(new AjaxMenuItem("link 2.1.2") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setMessage(getDefaultModel().getObject().toString());
target.addComponent(SuperfishMenuPanel.this.context);
}
});
susSubMenu.addItem(new AjaxMenuItem("link 2.1.3") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setMessage(getDefaultModel().getObject().toString());
target.addComponent(SuperfishMenuPanel.this.context);
}
});
susSubMenu.addItem(new AjaxMenuItem("link 2.1.4") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setMessage(getDefaultModel().getObject().toString());
target.addComponent(SuperfishMenuPanel.this.context);
}
});
SubMenu subSubSubMenu = new SubMenu("Sub menu 2.1.5");
susSubMenu.addItem(subSubSubMenu);
subSubSubMenu.addItem(new AjaxMenuItem("link 2.1.5.1") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
setMessage(getDefaultModel().getObject().toString());
target.addComponent(SuperfishMenuPanel.this.context);
}
});
subSubSubMenu.addItem(new AjaxMenuItem("link 2.1.5.2") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {