code: private String formatItem(CmsReportUpdateItem updateItem) {
  
          StringBuffer buf = new StringBuffer();
          CmsReportFormatType format = updateItem.getType();
          if (format == CmsReportFormatType.fmtException) {
              return formatException((Throwable)(updateItem.getMessage()));
          } else {
              String value = CmsStringUtil.escapeJavaScript((String)(updateItem.getMessage()));
              switch (format) {
                  case fmtHeadline:
                      buf = new StringBuffer();
                      buf.append("aH('");
                      buf.append(value);
                      buf.append("'); ");
                      break;
                  case fmtWarning:
                      buf = new StringBuffer();
                      buf.append("aW('");
                      buf.append(value);
                      buf.append("'); ");
                      break;
                  case fmtError:
                      buf = new StringBuffer();
                      buf.append("aE('");
                      buf.append(value);
                      buf.append("'); ");
                      break;
                  case fmtNote:
                      buf = new StringBuffer();
                      buf.append("aN('");
                      buf.append(value);
                      buf.append("'); ");
                      break;
                  case fmtOk:
                      buf = new StringBuffer();
                      buf.append("aO('");
                      buf.append(value);
                      buf.append("'); ");
                      break;
                  case fmtNewline:
                      buf = new StringBuffer();
                      buf.append("a('" + CmsHtmlReport.LINEBREAK + "');");
                      break;
                  case fmtDefault:
                  default:
                      buf = new StringBuffer();
                      buf.append("a('");
                      buf.append(value);
                      buf.append("'); ");
              }
  
              // the output lines get split back into single lines on the client-side.
              // thus, a separate JavaScript call has to be added here to tell the
              // client that we want a linebreak here...
              if (value.trim().endsWith(CmsHtmlReport.LINEBREAK)) {
                  buf.append("aB(); ");
              }
          }
          return buf.toString();
      }
docs: Formats a single report item.<p>
  
  @param updateItem the report item
  
  @return the formatted output