Feature #334
How can I show the data in WTreeView from database ?
| Status: | Closed | Start: | 03/16/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | Koen Deforche | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
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?
History
Updated by Koen Deforche 6 months ago
- Assigned to 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 4 months ago
- Status changed from New to Resolved
- Assigned to changed from Pieter Libin to Koen Deforche
We've implemented a QueryModel and the treeview/treetable now supports a paging toolbar with graceful degradation