Class Datalist

Represents a sortable, pagable list. This widget is
similar to the datagrid widget, except items are presented in a list
instead of a grid.

Part of:

package weblocks, class dataseq, class listedit

Direct Superclass

dataseqA base class for widgets that are designed to
present a sequence of data items. This class prov...

Direct Subclass

listeditA widget based on the 'datalist' that enhances it
with user interface to add, remove, and modif...

Slot

allow-drilldown-p
If set to true and 'on-drilldown' isn't nil, dataseq provides the UI to drill down into items.
Initform:t, Initargs::allow-drilldown-p; Accessors:dataseq-allow-drilldown-p.
allow-operations-p
If true, the widget deriving from dataseq provides a UI to access operations defined in 'item-ops' and 'common-ops'.
Initform:t, Initargs::allow-operations-p; Accessors:dataseq-allow-operations-p.
allow-pagination-p
Set to true to enable pagination (default) or nil to disable it.
Initform:t, Initargs::allow-pagination-p; Accessors:dataseq-allow-pagination-p.
allow-select-p
If true, dataseq provides the UI to select entries in the collection.
Initargs::allow-select-p; Accessors:dataseq-allow-select-p.
allow-sorting-p
If set to true (default), the field will be allowed to be sorted.
Initform:t, Initargs::allow-sorting-p; Accessors:view-field-sorting-mixin-allow-sorting-p.
autoset-drilled-down-item-p
If set to true, 'drilled-down-item' will be automatically set to the appropriate item when the user drills down on the widget.
Initargs::autoset-drilled-down-item-p; Accessors:dataseq-autoset-drilled-down-item-p.
class-store
Store where user data is being kept.
Initargs::class-store; Reader:login-class-store.
common-ops
Similar to 'item-ops', except operations aren't performed on a particular item, but on the widget as a whole (e.g. adding an item, deleting all items, etc). The destinction is made between common-ops and item-ops because different widgets may want to provide different UI for the two.
Initargs::common-ops; Accessors:dataseq-common-ops.
continuation
Stores the continuation object for widgets that were invoked via one of the do-* functions ('do-page', etc.). When 'answer' is called on a widget, this value is used to resume the computation.
Accessors:widget-continuation.
data-class
The class name of the objects rendered by this dataseq. While the class can potentially be obtained from the data directly, it is not always possible. Additionally, specifying the class makes dataseq more efficient. For these reasons it is required to specify this slot at the instantiation time.
Initargs::data-class; Accessors:dataseq-data-class.
dom-class
The DOM class (CSS class) of an object. Set this to a string if you'd like to add an additional CSS class to the ones generated from the class hierarchy by default.
Initargs::dom-class; Accessors:dom-class.
dom-id
The DOM id of an object. Can be a symbol, a string or nil. When accessed through the 'dom-id' accessor, will always become a string. Use ensure-dom-id or widget-name (for widgets) to access its underlying implementation.
Initargs::dom-id.
drilled-down-item
If 'allow-drilldown-p' is set to true and the user drills down on an item this slot can be set to the item in question. This slot is set to the drilled down item automatically only when 'autoset-drilled-down-item-p' is true. Note, it is always the responsibility of the dataseq's client to reset this slot back to nil.
Initargs::drilled-down-item; Accessors:dataseq-drilled-down-item.
flash
A flash widget provided by the dataseq to display relevant information to the user (errors, item modification information, etc.)
Initform:(make-instance 'flash), Initargs::flash; Accessors:dataseq-flash.
item-data-view
An optional custom data view that, if provided, is used to instantiate the 'item-widget'.
Initargs::item-data-view; Accessors:dataedit-item-data-view.
item-ops
A list of cons cells that define operations on items. A car of each cell should contain a name of the operation, while the cdr of each cell should contain a function that accepts two arguments - the widget object, and the selection cons cell passed to the function for convenience. Any given function is called by the dataseq when the appropriate operation has been invoked by the user.
Initargs::item-ops; Accessors:dataseq-item-ops.
on-drilldown
A cons cell that represents a drilldown operation. The car of the cell should contain symbol representing the name of the operation (i.e. 'details', 'edit', etc.) and the cdr of the cell should contain a function of two arguments (widget obj and item object). If this slot isn't set to nil and 'allow-drilldown-p' is true, dataseq provides the UI to drill down into items.
Initargs::on-drilldown; Accessors:dataseq-on-drilldown.
on-query
A function designator that accepts the widget instance, as well as sorting and pagination parameters. The function is expected to return a properly sorted and paged sequence. The function should also accept a :countp keyword argument. If true, the function should return only the number of items with the given parameters, not the actual items themselves. If this slot is NIL (the default), the dataseq will operate on all persistent classes specified in 'data-class'. Alternatively, 'on-query' may be a list of store-dependent keywords that will be passed to the datastore. This may be a SQL 'where' clause, etc.
Initargs::on-query; Accessors:dataseq-on-query.
orderedp
Determines if the datalist presents its items as an ordered list (default is true).
Initform:t, Initargs::orderedp; Accessors:datalist-ordered-p.
pagination-widget
An instance of a pagination widget used by the dataseq to manage data pagination.
Initargs::pagination-widget; Accessors:dataseq-pagination-widget.
propagate-dirty
A list of widget paths (see 'find-widget-by-path') or widgets each of which will be made dirty when this widget is made dirty via a POST request. This slot allows setting up dependencies between widgets that will make multiple widgets update automatically during AJAX requests.
Initargs::propagate-dirty; Accessors:widget-propagate-dirty.
rendered-data-sequence
A sequence of items currently rendered.
Reader:dataseq-rendered-data-sequence; Type:sequence.
renderedp
This slot holds a boolean flag indicating whether the widget has been rendered at least once. Because marking unrendered widgets as dirty may cause JS problems, 'mark-dirty' will use this flag to determine the status of a widget.
Accessors:widget-rendered-p.
selection
Contains a cons cell that identifies currently selected elements. That 'car' of the cell is either :all or :none. In case of :all, all items except the ones in the cdr list are selected. In case of :none, none of the elements except the ones in the cdr list are selected.
Initform:(cons none nil), Initargs::selection; Accessors:dataseq-selection.
show-total-items-count-p
If set to true (the default), the dataseq displays a message specifying how many items are visible.
Initform:t, Initargs::show-total-items-count-p; Accessors:dataseq-show-total-items-count-p.
view
A mixin view to be used to render the field.
Initargs::view; Accessors:mixin-view-field-view.
widget-prefix-fn
A function called prior to rendering the widget body. The function should expect the widget as well as any additional arguments passed to the widget.
Initargs::widget-prefix-fn; Accessors:widget-prefix-fn.
widget-suffix-fn
A function called after rendering the widget body. The function should expect the widget as well as any additional arguments passed to the widget.
Initargs::widget-suffix-fn; Accessors:widget-suffix-fn.

Direct Method

datalist-item-data-view
datalist-render-itemRenders a given item of a datalist object.
dataseq-render-mining-barThis function renders the data mining bar for widgets deriving
from dataseq. The data mining bar ...
dataseq-wrap-body-in-form-pDetermines whether 'render-widget-body- wraps the
body in a form. This behavior is occassionally ...
per-class-dependenciesReturn a list of dependencies for an object of a
particular class. For widgets, this method is ...
render-dataseq-bodyRenders the actual data of the dataseq without any controls before
or after. Widgets deriving fro...
setfdataseq-allow-select-p

Other Method

composite-widgets
dataseq-render-operationsThis function is responsible for rendering the operations for the
widget deriving from dataseq. S...
dataseq-render-operations-defaultThe default implementation of operation rendering. It renders item-ops
and common-ops as buttons...
dataseq-render-pagination-widgetThis function is responsible for rendering the pagination widget
for the dataseq.
dataseq-render-pagination-widget-defaultThis function renders the default the pagination widget for the dataseq.
dataseq-view
dependenciesReturn a list of dependencies for a particular
object.

Whenever a widget is rendered by webl...
dom-classesReturns a string that represents all applicable CSS
classes for an object (usually a widget). Nor...
dom-idProvides a consistent interface to identifying widgets
by their DOM id. Returns a string or nil i...
ensure-dom-idEnsure that the object has a 'dom-id' and return
it. 'dom-id' is lazily generated on first read...
find-widget-by-path*Returns a widget object located at 'path', where 'path' is a list
of widget names starting from r...
mark-dirtyDefault implementation adds a widget to a list of dirty
widgets. Normally used during an AJAX req...
render-widget-bodyA generic function that renders a widget in its current state. In
order to actually render the wi...
setfdom-id
setfwidget-name
setfwidget-parent
widget-nameAn interface to the DOM id of a widget. Provides
access to the underlying implementation, can r...