I'm trying to use Wicket-Bootstrap Navbar and NavbarDropDownButton inside my Wicket Application to display a list of links.
Web application is built with Wicket 8.7.0 and Wicket-Boostrap-core 3.0.0-M13.
The component I added to the Wicket Panel seems to work correctly, but once I click on the main link to display the dropdown content, all links are blank. Anyway I can click the links and they made their job.
Here's the picture taken from the browser:
Here's the HTML used:
....
<div class="navbar" wicket:id="utenteNavbar">
</div>
</div>
while this is my Java code:
Model<String> cambioPasswordStringModel = Model.of(getString("cambioPassword"));
Navbar navbar = new Navbar("utenteNavbar");
INavbarComponent dropDownComponent = new INavbarComponent() {
@Override
public ComponentPosition getPosition() {
return Navbar.ComponentPosition.LEFT;
}
@Override
public Component create(String markupId) {
NavbarDropDownButton dropdownButton = new NavbarDropDownButton(Model.of(welcomeMessage)) {
@Override
protected List<AbstractLink> newSubMenuButtons(String buttonMarkupId) {
final List<AbstractLink> linksList = new ArrayList<AbstractLink>();
AjaxLink<String> cambioPasswordLink = new AjaxLink<String>(buttonMarkupId,
cambioPasswordStringModel) {
@Override
public void onClick(AjaxRequestTarget target) {
setResponsePage(CambioPasswordPage.class);
}
};
linksList.add(cambioPasswordLink);
return linksList;
}
};
return dropdownButton;
}
};
navbar.addComponents(dropDownComponent);
add(navbar);
add(welcomeMessageLabel);
Where's the mistake? Maybe I'm missing something on the CSS side?
Hope everything is clear, thanks for any help.