Hey Sven,
2010/9/16 Wim Dumon <[email protected]>:
> As your method is called 'OnButtonClicked()', I guess that you want to
> start a file download in response to a click on a button. The easiest
> thing to do is either to replace the button with an WAnchor, or to put
> the button inside an anchor if you want to keep the visual appearance
> of the button. Bur if you want to defer the creation of your file (if
> it is dynamically created) to the moment that the user clicks the
> button, it becomes more complicated again: you'll need to specialize
> WResource and create the file in WResource::handleRequest() (when
> 'continuation' is false).
That should probably read specialize WFileResource and
WFileResource::handleRequest():
MyFileResource::handleRequest(const Http::Request &request,
Http::Response &response)
{
if (!request.continuation()) {
// Generate file ...
setFileName(...)
setMimeType(...)
}
WFileResource::handleRequest(request, response);
}
Regards,
koen
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest