/** * Appends a table showing a set of resources, and the cause of the notification.<p> * * @param htmlMsg html the StringBuffer to append the html code to * @param notificationCauseList the list of notification causes * @param header the title of the resource list */ private void appendResourceList(StringBuffer htmlMsg, List notificationCauseList, String header) { if (!notificationCauseList.isEmpty()) { htmlMsg.append("<tr><td colspan=\"5\"><br/><p style=\"margin-top:20px;margin-bottom:10px;\"><b>"); htmlMsg.append(header); htmlMsg.append("</b></p></td></tr><tr class=\"trow1\"><td><div style=\"padding-top:2px;padding-bottom:2px;\">"); htmlMsg.append(m_messages.key(Messages.GUI_RESOURCE_0)); htmlMsg.append("</div></td><td><div style=\"padding-top:2px;padding-bottom:2px;padding-left:10px;\">"); htmlMsg.append(m_messages.key(Messages.GUI_SITE_0)); htmlMsg.append("</div></td><td><div style=\"padding-top:2px;padding-bottom:2px;padding-left:10px;\">"); htmlMsg.append(m_messages.key(Messages.GUI_ISSUE_0)); htmlMsg.append("</div></td><td colspan=\"2\"/></tr>"); Iterator notificationCauses = notificationCauseList.iterator(); for (int i = 0; notificationCauses.hasNext(); i++) { CmsExtendedNotificationCause notificationCause = (CmsExtendedNotificationCause)notificationCauses.next(); htmlMsg.append(buildNotificationListItem(notificationCause, (i % 2) + 2)); } } }
/** * Appends a table showing a set of resources, and the cause of the notification.<p> * * @param htmlMsg html the StringBuffer to append the html code to * @param notificationCauseList the list of notification causes * @param header the title of the resource list */ private void appendResourceList( StringBuffer htmlMsg, List<CmsExtendedNotificationCause> notificationCauseList, String header) { if (!notificationCauseList.isEmpty()) { htmlMsg.append("<tr><td colspan=\"5\"><br/><p style=\"margin-top:20px;margin-bottom:10px;\"><b>"); htmlMsg.append(header); htmlMsg.append( "</b></p></td></tr><tr class=\"trow1\"><td><div style=\"padding-top:2px;padding-bottom:2px;\">"); htmlMsg.append(m_messages.key(Messages.GUI_RESOURCE_0)); htmlMsg.append("</div></td><td><div style=\"padding-top:2px;padding-bottom:2px;padding-left:10px;\">"); htmlMsg.append(m_messages.key(Messages.GUI_SITE_0)); htmlMsg.append("</div></td><td><div style=\"padding-top:2px;padding-bottom:2px;padding-left:10px;\">"); htmlMsg.append(m_messages.key(Messages.GUI_ISSUE_0)); htmlMsg.append("</div></td><td colspan=\"2\"/></tr>"); Iterator<CmsExtendedNotificationCause> notificationCauses = notificationCauseList.iterator(); for (int i = 0; notificationCauses.hasNext(); i++) { CmsExtendedNotificationCause notificationCause = notificationCauses.next(); htmlMsg.append(buildNotificationListItem(notificationCause, (i % 2) + 2)); } } }