Method 1:
Inherit the defaultdatatable and provide your own HTML template.
Method 2:
Inherit defaultdatatable, add Attributemodifier to the constructor so that no HTML template is provided and the template automatically inherits from defaultdatatable.html
About Odd,even. That is, the table provides a zebra effect that can be replicated defaultdatatable Newrowitem method:
@Overrideprotected item<t> Newrowitem (final String ID, final int index, final imodel<t> model) {return new Odde Venitem<t> (ID, index, model);} Contents of Oddevenitem: @Overrideprotected void Oncomponenttag (Componenttag tag) {Super.oncomponenttag (tag); Tag.put (" Class ", (GetIndex ()% 2 = = 0)? class_even:class_odd);}
You can create a new class that inherits from Oddevenitem, a replication oncomponenttag, such as for a purecss table:
@Overrideprotected void Oncomponenttag (Componenttag tag) {Super.oncomponenttag (tag); if (GetIndex ()% 2! = 0) { Tag.put ("Class", "pure-table-odd");}}
Adjust table output HTML for wicket DataTable