Hi,

I'm looking at using libwt, but there's something I'd like to be able to
do that I'm not seeing in the documentation. I'm new to libwt and all,
so feel free to correct whatever may be wrong in the following.

I think, normally when the WApplication constructor is called or some
signal callback is called, the application code adds various widgets and
whatnot, and then the callback or constructor returns, the page is
rendered and sent to the client (or for AJAX clients, the screen updates
are sent, etc).

What I would like, however, is the ability to postpone rendering or data
being pushed to the client until some other data is received. For
instance, if I want to wait until receiving data from a file descriptor
for some database connection or an authentication service, etc etc, I'd
like to be able to hand that file descriptor to the event loop that
libwt is using, and have some callback or something called from there. I
figure I can do that by hooking in to the io_service in
http::server::Server or whatever it's called, but this doesn't really
help if the response has already been pushed out.

What I would like is a way to tell wt to not render/flush/etc when the
function in question returns control to wt, but to only render when I
call some function (I assume something like flush() in WebResponse or
something). Does this exist?

I'm not sure if I'm just bad at browsing the documentation, but I
haven't found it. I am fairly certain that I am _not_ looking for
enableUpdates()-style server-initiated updates or "comet"-style events,
because I want to be able to do this without requiring AJAX. For plain
HTML requests (at least), I just want to delay sending the page to the
client until I have received all of the data I need, without blocking
the current thread.

The closest thing I have found to what I want looks like
Wt::Http::Response's createContinuation() method, but I don't see much
documentation that makes it clear how to use it. I get the feeling,
though, that this is intended for when an application is dynamically
generating some document (like a PDF or an image or something), and not
for general UI rendering, but I could be way off.

And if this does not yet exist in wt, would there be opposition to
adding something like this?

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to