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); }
/** @return */ public String getRenderId() { return tableComp.getRenderId(); }
/** @param newModel */ public void setModel(TableModel newModel) { tableComp.setModel(newModel); formComp.columnTreeModelChanged(); }
/** @return */ public int getPageCount() { return tableComp.getPageCount(); }
/** @return */ public int getPageSize() { return tableComp.getPageSize(); }
/** @return */ public TableModel getModel() { return tableComp.getModel(); }
/** @return */ public int getCurrentPage() { return tableComp.getCurrentPage(); }
/** @return */ public String getBorder() { return tableComp.getBorder(); }
/** @param newCurrentPage */ public void setCurrentPage(int newCurrentPage) { tableComp.setCurrentPage(newCurrentPage); }
/** @return */ public RowComparator getRowComparator() { return tableComp.getRowComparator(); }
/** @param message */ public void setError(String message) { tableComp.setError(message); }
/** @return */ public SelectionModel getSelectionModel() { return tableComp.getSelectionModel(); }
/** @param newPageable */ public void setPageable(boolean newPageable) { tableComp.setPageable(newPageable); }
/** @return */ public boolean isClosable() { return tableComp.isClosable(); }
/** @param renderId */ public void setRenderId(String renderId) { tableComp.setRenderId(renderId); }
/** @return */ public boolean isPageable() { return tableComp.isPageable(); }
/** @param newSortable */ public void setSortable(boolean newSortable) { tableComp.setSortable(newSortable); }
public void destroy(HttpSession session) throws Exception { formComp.destroy(session); tableComp.destroy(session); super.destroy(session); }
public boolean isReadOnly() { return tableComp.isReadOnly(); }
/** @param border */ public void setBorder(String border) { tableComp.setBorder(border); }
/** @return */ public boolean isSortable() { return tableComp.isSortable(); }
public boolean isVisible() { return tableComp.isVisible(); }