Project

General

Profile

Actions

Feature #334

closed

How can I show the data in WTreeView from database ?

Added by Anonymous about 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
03/16/2010
Due date:
% Done:

0%

Estimated time:

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?

Actions #1

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

Actions #2

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

Actions #3

Updated by Koen Deforche almost 14 years ago

  • Status changed from Resolved to Closed

Fixed in 3.1.3

Actions

Also available in: Atom PDF