[Bese-devel] generated content with ucw
Attila Lendvai
attila.lendvai at gmail.com
Fri Feb 17 00:03:59 UTC 2006
> Do you need an entry point?
> I use action-href to generate a url:
>
> Somewhere in a render method ((p my-component))
> ...
> An url is generated...
> (action-href (lambda () (my-method p)
>
> > - render this link somewhere in a page
> > - from the handler lambda of the entry point extract the actual socket
> > stream and write the content, set correct mime-type
>
> (defmethod render((a ajax-answer))
> (<:as-is (ajax-answer.text a)))
>
> I hope the general idea comes through. Just change the name from ajax to
> png and the content type. Maybe there are smarter solutions than this,
> but this works for me..
thanks for the hints, it helped a lot. there are problems, tough...
ucw writes all its output into a string buffer (html-stream in the
request, which is basically the same as *yaclml-stream*). i've managed
to get hold of the raw network stream, but:
- it is hackend-dependent (no big deal)
- it doesnt work, because the entire html header is written in the
string buffer and therefore it will be rendered _after_ the binary
data i've written into the raw stream
i hope Marco can shed some light on the issue and propose some
solution that i would be more then happy to implement if i can manage.
i tought of a new component similar to window-component, that somehow
manages to bind *yaclml-stream* to the raw output stream and does not
use the response string buffering. but i don't understand ucw
internals enough for these things...
any hints/plans for this?
- attila
(alias 101 on irc &no 'its not lisp code :)
More information about the bese-devel
mailing list