Wtx ~ Wt Extension Library
WtxLib
|
The WTableView is an excellent component for representing and interacting with huge data sets. The WTableView will only grab 50 or so items from the database and represent them in the view. As the user scrolls, the object will grab additional 'pages' of data, and allow the browser to scroll through them fluidly.
The trick to getting this to work properly is to make sure that the WTableView knows the height of the browser. This is more difficult that one might expect. (when one says 'one' substitute; 'author'). This is especially difficult with advanced websites with lots of objects (widgets) and views and layouts.
The trick is to use the WLayout managers. The key to using these managers is to insure that 'every' div element down to the root() element has a layout manager assigned to it. This is especially tricky on complex websites with lots of different widgets.
There's a problem though;
https://redmine.webtoolkit.eu/boards/2/topics/15120
The new Wt-4 uses 'flex' as the default layout manager, and 'flex' causes the WTableView indigestion. So it is important to swtich back to the java-based layout management.
The switch to 'java' as the layout manager is supposed to be done at main.cpp prior to anything else inside Wt getting initialized. You can read about that here: https://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WLayout.html and look for 'setDefaultImplementation'.
This is how I do it in my projects: