|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.Table
com.arsdigita.toolbox.ui.AbstractCollectionTable
This provides a base table to show the elements of a DomainCollection
Nested Class Summary |
Nested classes inherited from class com.arsdigita.bebop.Table |
Table.MatrixTableModelBuilder |
Field Summary | |
static String |
ASCENDING
|
static String |
DESCENDING
|
static String |
DIRECTION
|
Fields inherited from class com.arsdigita.bebop.Table |
CELL_EVENT, EMPTY_MODEL, SEP, versionId |
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Fields inherited from class com.arsdigita.bebop.SimpleComponent |
m_attr |
Fields inherited from interface com.arsdigita.bebop.util.BebopConstants |
BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA |
Fields inherited from interface com.arsdigita.bebop.Component |
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE |
Constructor Summary | |
AbstractCollectionTable(RequestLocal collection)
This expects to receive a RequestLocal that will return the appropriate DomainCollection to be displayed |
Method Summary | |
protected TableColumn |
addColumn(String label,
String attribute,
boolean isSortable,
String type)
This adds the column to the table use the default table cell renderer |
protected TableColumn |
addColumn(String label,
String attribute,
boolean isSortable,
TableCellRenderer renderer,
String type)
This adds the column to the table. |
void |
generateExtraXMLAttributes(PageState state,
Element element)
Adds type-specific XML attributes to the XML element representing this link. |
protected String |
getColumnType(int index)
|
String |
getDefaultOrder()
Get the key of the default column which will be used to sort the entries |
DomainCollection |
getDomainCollection(PageState state)
This returns the collection that is displayed by this table. |
String |
getOrderDirection(PageState s)
|
BigDecimal |
getSelectedTask(PageState ps)
|
int |
getTotalSize(Paginator paginator,
PageState s)
Paginate the query according to the paginator component. |
protected abstract TableModel |
makeTableModel(PageState ps)
This method should return the table model to use. |
void |
register(Page p)
Register the ordering parameter |
void |
setDefaultOrder(String attribute)
Set the key of the default column which will be used to sort the entries. |
void |
setDefaultOrderDirection(String direction)
The default sort order |
void |
setOrderDirection(PageState s,
String dir)
Set the sort direction |
protected void |
tableCellSelected(PageState ps,
Object key,
int index)
|
protected void |
tableHeadSelected(PageState ps,
int index)
|
String |
toggleOrderDirection(PageState s)
Toggle the sort direction between ascending and descending |
Methods inherited from class com.arsdigita.bebop.BlockStylable |
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment |
Methods inherited from class com.arsdigita.bebop.TextStylable |
setBackgroundColor, setColor |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, register, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
Methods inherited from class com.arsdigita.bebop.Completable |
addCompletionListener, fireCompletionEvent |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.arsdigita.bebop.PaginationModelBuilder |
isVisible |
Field Detail |
public static final String DIRECTION
public static final String ASCENDING
public static final String DESCENDING
Constructor Detail |
public AbstractCollectionTable(RequestLocal collection)
Method Detail |
public void register(Page p)
register
in interface Component
register
in class Table
p
- the page that contains this tablepublic void setDefaultOrderDirection(String direction)
direction
- The direction (either ASCENDING or DESCENDING)public String getOrderDirection(PageState s)
s
- the page state
public void setOrderDirection(PageState s, String dir)
s
- the page statedir
- the direction in which the current column
should be sorted; either ASCENDING or DESCENDINGpublic String toggleOrderDirection(PageState s)
s
- the page state
public void setDefaultOrder(String attribute)
attribute
- the default attribute to sort bypublic String getDefaultOrder()
protected TableColumn addColumn(String label, String attribute, boolean isSortable, String type)
protected TableColumn addColumn(String label, String attribute, boolean isSortable, TableCellRenderer renderer, String type)
label
- The label for the header of the columnattribute
- The corresponding attribute in the tablerenderer
- The cell renderer to use to display the columntype
- The type of the column so that we can later
look up the index of the columnpublic BigDecimal getSelectedTask(PageState ps)
protected void tableCellSelected(PageState ps, Object key, int index)
protected void tableHeadSelected(PageState ps, int index)
public int getTotalSize(Paginator paginator, PageState s)
Paginator
component to which this DataTable
has been added
as the model builder.
getTotalSize
in interface PaginationModelBuilder
paginator
- the parent Paginator
s
- the current page state
public DomainCollection getDomainCollection(PageState state)
protected String getColumnType(int index)
index
- This is the index to look up
protected abstract TableModel makeTableModel(PageState ps)
public void generateExtraXMLAttributes(PageState state, Element element)
Table
generateXML
produces by default.
generateExtraXMLAttributes
in class Table
state
- represents the current requestelement
- the XML element representing this table
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |