HtmlMenuItem quickLinksItem = new HtmlMenuItem();
quickLinksItem.setSubmitMode("none");
quickLinksItem.setId(descriptor.getMenuItemId());
HtmlOutputLink link;
HtmlGraphicImage image;
if (descriptor.getMonitoringUrl() != null /* && LookupUtil.getSystemManager().isMonitoringEnabled()*/) {
link = FacesComponentUtility.addOutputLink(quickLinksItem, null, descriptor.getMonitoringUrl());
image = FacesComponentUtility.addGraphicImage(link, null, "/images/icons/Monitor_grey_16.png", "Monitor");
image.setStyle(STYLE_QUICK_LINKS_ICON);
}
if (descriptor.getInventoryUrl() != null) {
link = FacesComponentUtility.addOutputLink(quickLinksItem, null, descriptor.getInventoryUrl());
image = FacesComponentUtility.addGraphicImage(link, null, "/images/icons/Inventory_grey_16.png",
"Inventory");
image.setStyle(STYLE_QUICK_LINKS_ICON);
}
if (descriptor.getAlertsUrl() != null /*&& LookupUtil.getSystemManager().isMonitoringEnabled()*/) {
link = FacesComponentUtility.addOutputLink(quickLinksItem, null, descriptor.getAlertsUrl());
image = FacesComponentUtility.addGraphicImage(link, null, "/images/icons/Alert_grey_16.png", "Alerts");
image.setStyle(STYLE_QUICK_LINKS_ICON);
}
if (descriptor.getConfigurationUrl() != null && facets.isConfiguration()) {
link = FacesComponentUtility.addOutputLink(quickLinksItem, null, descriptor.getConfigurationUrl());
image = FacesComponentUtility.addGraphicImage(link, null, "/images/icons/Configure_grey_16.png",
"Configuration");
image.setStyle(STYLE_QUICK_LINKS_ICON);
}
if (descriptor.getOperationUrl() != null && facets.isOperation()) {
link = FacesComponentUtility.addOutputLink(quickLinksItem, null, descriptor.getOperationUrl());
image = FacesComponentUtility.addGraphicImage(link, null, "/images/icons/Operation_grey_16.png",
"Operations");
image.setStyle(STYLE_QUICK_LINKS_ICON);
}
if (descriptor.getEventUrl() != null && facets.isEvent()) {
link = FacesComponentUtility.addOutputLink(quickLinksItem, null, descriptor.getEventUrl());
image = FacesComponentUtility.addGraphicImage(link, null, "/images/icons/Events_grey_16.png", "Events");
image.setStyle(STYLE_QUICK_LINKS_ICON);
}
if (descriptor.getContentUrl() != null && facets.isContent()) {
link = FacesComponentUtility.addOutputLink(quickLinksItem, null, descriptor.getContentUrl());
image = FacesComponentUtility.addGraphicImage(link, null, "/images/icons/Content_grey_16.png", "Content");
image.setStyle(STYLE_QUICK_LINKS_ICON);
}
menu.getChildren().add(quickLinksItem);
}