-
Notifications
You must be signed in to change notification settings - Fork 5
Table Sorting
PmTableImpl supports table row sorting.
Each table column may be declared as sortable by defining @PmTableColCfg(sortable=PmBoolean.TRUE)
.
If all table columns should be sortable the table may be annotated: @PmTableCfg(sortable=true)
.
An initial row sort order defines the sort order that will be used when no column sort-by definition is active.
An sortable column may be used to specifiy the initial sort order:
-
@PmTableCfg(initialSortCol = "myCol")
- defines an initial ascending sort order by 'myCol'. -
@PmTableCfg(initialSortCol = "myCol,desc")
- defines an initial descending sort order by 'myCol'.
It can be defined as follows:
@PmTableCfg(initialBeanSortComparator = MyComparator.class)
Sort order options for service based tables are configured within the QueryOptions
instance provided by PmTableImpl.getPmQueryOptions()
.
In the next pm4j release (0.7) this configuration will be unified. The sort order will be annotation based for service based tables too.