Esempio n. 1
0
  /**
   * creates an editable table component.
   *
   * @param id
   * @param tableComp
   * @param formComp - form for editing the table properties
   */
  public EditableTableComponent(
      String id,
      Component parent,
      TableComponent tableComp,
      TablePropertiesFormComponent formComp) {
    super(id, parent);
    this.tableComp = tableComp;
    this.formComp = formComp;
    tableComp.setParent(this);
    formComp.setParent(this);

    // this is a little sloppy, because both components
    // are validated although only one can be visible
    addFormListener(tableComp);
    addFormListener(formComp);

    editButtonId = id + ".edit";
    getDispatcher().addRequestListener(editButtonId, null, editButtonListener);
  }