using wicket I want to open a new tab when a button or link is clicked, how can I achieve it?
what I have managed to do is to open it in a pop up like this:
PopupSettings popupSettings = new PopupSettings("popuppagemap").setLeft(0).setHeight(500).setWidth(500).setHeight(0);
// Popup example
final Link<Void> setPopupSettings = new BookmarkablePageLink<Void>("searchBtn", HomePage.class)
.setPopupSettings(popupSettings);
but this opens it in a new window.
no problem to open a link in a new tab: just add 'target="_blank"' to the link.
final Link<Void> link = new BookmarkablePageLink<Void>("link", HomePage.class){
@Override
protected void onComponentTag(ComponentTag tag) {
super.onComponentTag(tag);
tag.put("target", "_blank");
}
};
add(link);