@Override
  public List<String> update(
      String attachmentId, Field field, FieldTemplate template, PagesContext PagesContext)
      throws FormException {
    checkFieldType(field.getTypeName(), "VideoFieldDisplayer.update");
    List<String> attachmentIds = new ArrayList<String>();

    if (!StringUtil.isDefined(attachmentId)) {
      field.setNull();
    } else {
      ((FileField) field).setAttachmentId(attachmentId);
      attachmentIds.add(attachmentId);
    }
    return attachmentIds;
  }
 /** Returns true if the given field is greater then the reference. */
 public boolean match(Field tested) {
   if (reference.isNull()) {
     return true;
   } else {
     return tested.compareTo(reference) >= 0;
   }
 }
  @Override
  public void display(
      PrintWriter out, Field field, FieldTemplate template, PagesContext pagesContext)
      throws FormException {
    checkFieldType(template.getTypeName(), "VideoFieldDisplayer.display");
    String attachmentId = field.getValue();
    if (!StringUtil.isDefined(attachmentId)) {
      attachmentId = "";
    }
    if (!template.isHidden()) {
      ElementContainer xhtmlcontainer = new ElementContainer();
      if (template.isReadOnly()) {
        displayVideo(attachmentId, template, xhtmlcontainer, pagesContext);
      } else if (!template.isDisabled()) {
        displayVideoFormInput(attachmentId, template, xhtmlcontainer, pagesContext);
      }

      out.println(xhtmlcontainer.toString());
    }
  }