Project

General

Profile

Have a example about wt::tableview use createPageNavigationBar?

Added by yu feng over 6 years ago

I can't use wt::tableview createPageNavigationBar(), pageChanged()


Replies (4)

RE: Have a example about wt::tableview use createPageNavigationBar? - Added by Mark Petryk over 6 years ago

Hi Yu,

Can you give more information about your use case? Why are you wanting to build a navigation bar from a table view?

RE: Have a example about wt::tableview use createPageNavigationBar? - Added by Wim Dumon over 6 years ago

Hey Yu,

unless I'm mistaken, the pagination is intended to be shown on browsers without JavaScript/Ajax. In the other case, the data is partially loaded, and updates as the user scrolls through the WTableView.

Wim.

RE: Have a example about wt::tableview use createPageNavigationBar? - Added by yu feng over 6 years ago

I want to load only some data ,not all data

like this:

SELECT * FROM tuser WHERE conditions LIMIT ${iRows} OFFSET (${iPage}-1)*${iRows}

RE: Have a example about wt::tableview use createPageNavigationBar? - Added by Wim Dumon over 6 years ago

Hi,

That is pretty much what Wt::Dbo::QueryModel< Result > does: as data is queried, it fetches other parts of the query result. This works nicely in the design of WTableView, that will only query the model for data for the visible rows (plus a little margin).

Wim.

    (1-4/4)