Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: x.x
-
Component/s: DSL for Presentation
-
Labels:None
-
Number of attachments :
Description
Something like:
public class SortableComestibleDataProvider extends SortableDataProvider<ComestibleDto> { private static final Log log = LogFactory.getLog(SortableComestibleDataProvider.class); @SpringBean private BreakfastLocalService service; public SortableComestibleDataProvider(BreakfastLocalService service) { this.service = service; // set default sort setSort("name", true); } @SuppressWarnings("unchecked") public Iterator iterator(int first, int count) { SortParam sp = getSort(); return service.listComestibles(first, count, sp.getProperty()).iterator(); //return service.listComestibles(first, count).iterator(); } public IModel<ComestibleDto> model(ComestibleDto object) { final Long id = (object).getId(); return new LoadableDetachableModel<ComestibleDto>() { @Override protected ComestibleDto load() { return service.readComestibleAsComestibleDto(id); } }; } public int size() { return (int) service.countComestibles(); } public void detach() { } }
Activity
Johan Vogelzang
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.2.0 [ 15723 ] | |
| Fix Version/s | 1.3.0 [ 16187 ] |
Jos Warmer
made changes -
| Resolution | Duplicate [ 3 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
Johan Vogelzang
made changes -
| Resolution | Duplicate [ 3 ] | |
| Status | Closed [ 6 ] | Reopened [ 4 ] |
Johan Vogelzang
made changes -
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 2.0 [ 16488 ] | |
| Fix Version/s | 1.3.0 [ 16187 ] |