WTableView, asyncronous loading and bootstrap mode
Added by Anonymous over 12 years ago
Hello,
WTableView can display its content without paging by asynchronously loading information.
Why this feature works only with the default bootstrap method? It switches to paging mode with progressive bootstrap method.
Thanks for your help.
Replies (5)
RE: WTableView, asyncronous loading and bootstrap mode - Added by Wim Dumon over 12 years ago
Hello Arnaud,
WTableView will use a paging bar if JavaScript is not available. Progressive bootstrap mode will at first render all widgets as if JavaScript/AJAX is not available (which could be the case), and after the initial page load it should update all widgets to a JavaScript/AJAX enabled mode, if that capability is detected.
Thus what you should see happening is that the WTableView is rendered with a paging bar if it is visible on the initial page, but switch to the dynamic loaded version after JS is detected and the page is progressively updated for JS support. This may cause some visible artefact.
You should see this only if the WTableView is visible right from the start of your session, so on the first page you see. Are you in that case? Is the WTableView progressively updated when JS is detected?
Best regards,
Wim.
RE: WTableView, asyncronous loading and bootstrap mode - Added by Anonymous over 12 years ago
Thanks for your quick answer Wim,
Yes, I am in the case you described: my application has only one page. It never goes to another URL. All the contents are attached or detach from a single point in the DOM tree.
If I create the part with the WTableView (not shown at the starting time and displayed after an action of the user) just before showing it (not at the starting time) maybe the dynamic version will be used ?
RE: WTableView, asyncronous loading and bootstrap mode - Added by Anonymous over 12 years ago
I tried my last suggestion and it works (not a big surprise...). I can create a WTableView in the first page after some time (after the end of the progressive bootstrap checking); the dynamic version works.
But !... This situation is not convenient for my application (network communication problems).
How can I check if the progressive bootstrap checking is done (and create all the needed stuff after that)?
RE: WTableView, asyncronous loading and bootstrap mode - Added by Anonymous over 12 years ago
Self answer :)
Yes, I can detect if the progressive bootstrap checking is done and create the WTableView at the right time. I used the WApplication::enableAjax() method to do that.
I will do more tests about that but for now my application works like a charm!
RE: WTableView, asyncronous loading and bootstrap mode - Added by Wim Dumon over 12 years ago
That is the correct answer.
BR,
Wim.