// Paint notifications
if (notifications != null) {
target.startTag("notifications");
for (final Iterator<Notification> it = notifications.iterator(); it
.hasNext();) {
final Notification n = it.next();
target.startTag("notification");
if (n.getCaption() != null) {
target.addAttribute(
UIConstants.ATTRIBUTE_NOTIFICATION_CAPTION,
n.getCaption());
}
if (n.getDescription() != null) {
target.addAttribute(
UIConstants.ATTRIBUTE_NOTIFICATION_MESSAGE,
n.getDescription());
}
if (n.getIcon() != null) {
target.addAttribute(
UIConstants.ATTRIBUTE_NOTIFICATION_ICON,
n.getIcon());
}
if (!n.isHtmlContentAllowed()) {
target.addAttribute(
UIConstants.NOTIFICATION_HTML_CONTENT_NOT_ALLOWED,
true);
}
target.addAttribute(
UIConstants.ATTRIBUTE_NOTIFICATION_POSITION, n
.getPosition().ordinal());
target.addAttribute(UIConstants.ATTRIBUTE_NOTIFICATION_DELAY,
n.getDelayMsec());
if (n.getStyleName() != null) {
target.addAttribute(
UIConstants.ATTRIBUTE_NOTIFICATION_STYLE,
n.getStyleName());
}
target.endTag("notification");
}
target.endTag("notifications");
notifications = null;