public StandardTable(TableComponent table, JRBaseObjectFactory factory) {
    whenNoDataType = table.getWhenNoDataType();

    datasetRun = factory.getDatasetRun(table.getDatasetRun());

    ColumnFactory columnFactory = new ColumnFactory(factory);
    columns = columnFactory.createColumns(table.getColumns());
  }
  public Document render(RequestContext context) throws Exception {
    if (isEditFormVisible()) return formComp.render(context);

    Document doc = tableComp.render(context);
    if (editable) doc.getDocumentElement().setAttribute("editId", editButtonId);
    return doc;
  }
  /**
   * 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);
  }
 public void setVisible(boolean b) {
   tableComp.setVisible(b);
 }
 /** @param b */
 public void setClosable(boolean b) {
   tableComp.setClosable(b);
 }
 /** @param index */
 public void setSortColumnIndex(int index) {
   tableComp.setSortColumnIndex(index);
 }
 public void setReadOnly(boolean readOnly) {
   tableComp.setReadOnly(readOnly);
 }
 /** @param newPageSize */
 public void setPageSize(int newPageSize) {
   tableComp.setPageSize(newPageSize);
 }
 /** @param selectionModel */
 public void setSelectionModel(SelectionModel selectionModel) {
   tableComp.setSelectionModel(selectionModel);
 }
示例#10
0
 /** @return */
 public String getRenderId() {
   return tableComp.getRenderId();
 }
示例#11
0
 /** @param newModel */
 public void setModel(TableModel newModel) {
   tableComp.setModel(newModel);
   formComp.columnTreeModelChanged();
 }
示例#12
0
 /** @return */
 public int getPageCount() {
   return tableComp.getPageCount();
 }
示例#13
0
 /** @return */
 public int getPageSize() {
   return tableComp.getPageSize();
 }
示例#14
0
 /** @return */
 public TableModel getModel() {
   return tableComp.getModel();
 }
示例#15
0
 /** @return */
 public int getCurrentPage() {
   return tableComp.getCurrentPage();
 }
示例#16
0
 /** @return */
 public String getBorder() {
   return tableComp.getBorder();
 }
示例#17
0
 /** @param newCurrentPage */
 public void setCurrentPage(int newCurrentPage) {
   tableComp.setCurrentPage(newCurrentPage);
 }
示例#18
0
 /** @return */
 public RowComparator getRowComparator() {
   return tableComp.getRowComparator();
 }
示例#19
0
 /** @param message */
 public void setError(String message) {
   tableComp.setError(message);
 }
示例#20
0
 /** @return */
 public SelectionModel getSelectionModel() {
   return tableComp.getSelectionModel();
 }
示例#21
0
 /** @param newPageable */
 public void setPageable(boolean newPageable) {
   tableComp.setPageable(newPageable);
 }
示例#22
0
 /** @return */
 public boolean isClosable() {
   return tableComp.isClosable();
 }
示例#23
0
 /** @param renderId */
 public void setRenderId(String renderId) {
   tableComp.setRenderId(renderId);
 }
示例#24
0
 /** @return */
 public boolean isPageable() {
   return tableComp.isPageable();
 }
示例#25
0
 /** @param newSortable */
 public void setSortable(boolean newSortable) {
   tableComp.setSortable(newSortable);
 }
示例#26
0
 public void destroy(HttpSession session) throws Exception {
   formComp.destroy(session);
   tableComp.destroy(session);
   super.destroy(session);
 }
示例#27
0
 public boolean isReadOnly() {
   return tableComp.isReadOnly();
 }
示例#28
0
 /** @param border */
 public void setBorder(String border) {
   tableComp.setBorder(border);
 }
示例#29
0
 /** @return */
 public boolean isSortable() {
   return tableComp.isSortable();
 }
示例#30
0
 public boolean isVisible() {
   return tableComp.isVisible();
 }