// show link...
markupContainer.add(link);
link.add(label);
if(this.description != null) {
label.add(new AttributeModifier("title", Model.of(description)));
}
if(this.blobOrClob) {
link.add(new CssClassAppender("noVeil"));
}
if(this.prototype) {
link.add(new CssClassAppender("prototype"));
}
if(this.cssClass != null) {
markupContainer.add(new CssClassAppender(this.cssClass));
}
link.add(new CssClassAppender(this.actionIdentifier));
// .. and hide label
Components.permanentlyHide(markupContainer, CssMenuItem.ID_MENU_LABEL);
return link;
} else {
// hide link...
Components.permanentlyHide(markupContainer, ID_MENU_LINK);
// ... and show label, along with disabled reason
label.add(new AttributeModifier("title", Model.of(this.getDisabledReason())));
label.add(new AttributeModifier("class", Model.of("disabled")));
markupContainer.add(label);
return label;
}