Feature #334
closedHow can I show the data in WTreeView from database ?
0%
Description
In the treeview-dragdrop sample,the WTreeView works perfectly with WStandardItemModel and WSortFilterProxyModel.
But,the data in WStandardItemModel is in the server's memory.
How can I deel with the data in database?
Does WTreeView support paging like the Ext Paging Toolbar?
Updated by Koen Deforche about 14 years ago
- Assignee set to Pieter Libin
Hey,
You need to implement a custom model. The WTreeView lazy-renders contents, so that only the visible region needs to be fetched from your database. Together with fetching in batches, this works nearly optimal w.r.t needed queries to the database.
We have used this technique already with JWt, creating a HibernateModel. We will be adding examples that show this for both C (using Wt::Dbo) and JWt (using Hibernate/JPA).
Regards,
koen
Updated by Koen Deforche almost 14 years ago
- Status changed from New to Resolved
- Assignee changed from Pieter Libin to Koen Deforche
We've implemented a QueryModel and the treeview/treetable now supports a paging toolbar with graceful degradation