Class DataTable<T>
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.display.DataTable<T>
- All Implemented Interfaces:
Component
Object-backed table renderer with column extractors.
Mutable and not thread-safe. Columns and rows are accumulated on this instance. Mutate within a request-scoped flow. For reuse, stop mutating and render as a stable structure with per-request slot/context values.
-
Field Summary
Fields inherited from class HtmlTag
attributes, children, id, innerText, innerTextSlot, selfClosing, tagName, trustedHtml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a column with header and value extractor.Adds a column with optional CSS class.Appends one row object.bordered()Enables bordered table class.static <T> DataTable<T> Creates a data table.Materializes a table child and returns it with any additional inherited children.Enables hover table class.sortable()Enables sortable class markers.striped()Enables striped table class.Appends all provided rows.Methods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, getId, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, render, withAttribute, withChild, withClass, withId, withInnerText, withInnerText, withMaxWidth, withMinWidth, withUnsafeHtml, withWidth
-
Constructor Details
-
DataTable
public DataTable()Creates a data-table wrapper container.
-
-
Method Details
-
create
-
addColumn
-
addColumn
-
withData
-
addRow
-
striped
-
bordered
-
hoverable
-
sortable
-
getChildrenStream
Materializes a table child and returns it with any additional inherited children.- Overrides:
getChildrenStreamin classHtmlTag- Returns:
- children stream
-