> > How do you guys implement a link that is conditional? Like for example the > link only shows if a given data is provided. Adding the <a>-tag in the > Markup will coz an error if the condition is not met, because AjaxLink is > not added. > > I usually handle such a situation by overriding the isVisible() method of the component:
add(new Link("link") {
@Override
public boolean isVisible() {
boolean externalCondition = ....;
return super.isVisible() && externalCondition;
}
});
