@Override
    protected TableRows getTableRows(final PageParameter pp) {
      final InputElement beanId = InputElement.hidden("beanId");
      final InputElement ae_topic = new InputElement("ae_topic");
      final InputElement ae_videotime = new InputElement("ae_videotime");
      final InputElement ae_description = InputElement.textarea("ae_description").setRows(4);

      Option[] opts = null;
      final Class<? extends Enum<?>> eClass = getAttachmentTypeClass();
      if (eClass != null) {
        final Enum<?>[] vals = eClass.getEnumConstants();
        opts = new Option[vals.length];
        for (int i = 0; i < opts.length; i++) {
          opts[i] = new Option(vals[i].ordinal(), vals[i]);
        }
      }

      final NewsAttachment attachment = getAttachment(pp);
      if (attachment != null) {
        beanId.setText(attachment.getId());
        ae_topic.setText(attachment.getTopic());
        ae_videotime.setText(attachment.getVideoTime());
        ae_description.setText(attachment.getDescription());
        if (opts != null) {
          opts[attachment.getAttachtype()].setSelected(true);
        }
      }

      final TableRows rows =
          TableRows.of(new TableRow(new RowField($m("AttachmentEditPage.1"), beanId, ae_topic)));
      if (opts != null) {
        rows.append(
            new TableRow(
                new RowField(
                    $m("AttachmentEditPage.2"),
                    InputElement.select("ae_attachtype").addElements(opts))));
      }

      return rows.append(
          new TableRow(new RowField($m("NewsFormAttachPage.7"), ae_videotime)),
          new TableRow(new RowField($m("Description"), ae_description)));
    }