Framework
3.9
|
DataListView displays a list of DataItems (or InnerJoinResults) in tabular format. More...
Public Member Functions | |
DataListView ($items, $id, $cssClass="list", $sortable=true, $pageSize=0, $filter=false) | |
Creates a new DataListView object. More... | |
getID () | |
scrollable ($height=300, $resizable=true) | |
enableDragReorder ($handler) | |
Turns on drag & drop item reordering for the table. More... | |
column ($title, $format, $sortable=false, $style=null, $typeHint=null, $onExport=null, $sortFormat=null) | |
Adds a column definition to the DataListView. More... | |
exportColumn ($title, $format, $sortable=false, $style=null, $typeHint=null, $onExport=null, $sortFormat=null) | |
Adds a column definition to the DataListView that is only output when exporting the table to Excel. More... | |
setColumnOrder ($order) | |
Override the column order. More... | |
selector ($format="") | |
Adds a selector column to the DataListView. More... | |
formatRowId ($item) | |
commandMenu () | |
Adds a command menu to the table that can contain a list of operations that can be performed on subselections of the table's contents. More... | |
contextMenu () | |
Adds a right-click context menu to the table that can contain a list of operations that can be performed on subselections of the table's contents. More... | |
addToolbarCallback ($callback) | |
Registers a toolbar callback. More... | |
footerText ($text="", $style="", $colspan=1) | |
Adds a text column to the table footer. More... | |
footerValue ($callback, $style="", $colspan=1) | |
Adds a value column to the table footer. More... | |
footerTotal ($field, $style="text-align: right", $colspan=1, $typeHint=Number) | |
Sums the total for a column. More... | |
setID ($id=null) | |
Sets the client-side ID for this DataListView. More... | |
addFacetTaggingHandler ($handler) | |
Adds a row tagging handler. More... | |
getExcelLink () | |
Get the Excel Link. More... | |
autoPopulate ($item) | |
Automatically build the table columns from the given DataItem. More... | |
writeScript () | |
Write the Javascript to implement the table output. More... | |
drawView () | |
Writes the HTML for the data table to the output buffer. More... | |
drawViewToString () | |
Render the table view and return the generated HTML as a string. More... | |
writeExcelFile ($file) | |
Writes the data table out as an Excel File. More... | |
Public Attributes | |
$columns | |
The column definitions for the table. More... | |
$footerColumns | |
The footer column definitions for the table. More... | |
$cssClass | |
Optional CSS class to apply to the table. More... | |
$id | |
ID of the table in the output script. More... | |
$sortable | |
Specifies whether to enable client-side sorting for this table. More... | |
$pageSize | |
Specifies the number of items per page - set to zero for unpaginated. More... | |
$cssStyle | |
Optional additional inline styles to apply to the table. More... | |
$emptyMessage | |
Message to display when no items are present in the data set. More... | |
$onStartRow | |
Callback hook that gets called at the start of each row. More... | |
$onDrawfooter | |
Callback hook that gets called after all rows have been drawn. More... | |
$tagRowCallbacks | |
Array of callbacks for adding extra attributes to each row. More... | |
$totalCallbacks | |
Array of callbacks for totalling columns. More... | |
$filter | |
Specifies whether to enable client-side filtering for this table. More... | |
$excelFile | |
Filename for automatic Excel export. More... | |
$paginate = true | |
Specifies whether table should be paginated (false for view only pages) More... | |
$summary | |
Human-readable summary of the information contained in the table (for usability/accessiblity purposes) More... | |
$zebra | |
Specifies whether alternate rows in the table should be striped. More... | |
$height | |
$scrollable = false | |
$resizable = true | |
$rowId = false | |
whether to include an id tag for each tr row More... | |
$rowIdFormat = null | |
Optionally specify a custom row ID format. More... | |
$dragReorder = false | |
Enabled drag & drop reordering. More... | |
$reorderHandler = null | |
Handler script that implements reordering records. More... | |
$dragColumnReorder = false | |
Enable drag & drop column reordering and show/hide capabilities. More... | |
$columnReorderCallback = null | |
Javascript callback function that is triggered when columns are reordered. More... | |
$hideExcelIcon = false | |
Suppress the automatic Excel icon if you want an external link. More... | |
$onRowClick = null | |
Javascript callback function that is triggered with a row is clicked. More... | |
$onRowHover = null | |
Javascript callback function that is triggered with a row is hovered over. More... | |
$dragText = "" | |
Optional text to display above reorderable table. More... | |
$selectable = false | |
Whether the table provides a selection mechanism. More... | |
$showSelectAll = false | |
Show Select All button for selectable tables. More... | |
$menu = null | |
Command menu for selection-based operations. More... | |
$contextMenu = null | |
Right-click context menu for selection based operations. More... | |
$commandMenuIcon = "/fakoli/images/data_view_menu.png" | |
Icon to use for the command menu dropdown. More... | |
$toolbarCallbacks = array() | |
Override this callback to add toolbar links into the first header cell. More... | |
Static Public Attributes | |
static | $includesWritten = false |
DataListView displays a list of DataItems (or InnerJoinResults) in tabular format.
The table is optionally sortable and filterable by column, and can be automatically paginated. The full table is sent to the client and sorting, filtering and pagination are handled at the client via Javascript.
DataListViews can also be rendered directly into binary Microsoft Excel format via the writeExcelFile() method.
Definition at line 55 of file data_view.inc.