You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Tommy Sullivan <to...@gmail.com> on 2009/09/28 19:55:43 UTC
render tile without request
Hi,
A portion of the web application I'm working on uses Comet to push
updates to a client. These functions don't have access to a
HttpServletRequest, only a RESTEasy AsynchronousResponse. Is there
any way I can use the TilesContainer to render a definition without
the HttpServletRequest? I'd love to be able to pass the container a
definition and model and receive a string to put in the
AsynchronousResponse.
Any suggestions would be greatly appreciated.
Thank you,
Tommy
Re: render tile without request
Posted by Antonio Petrelli <an...@gmail.com>.
2009/9/28 Tommy Sullivan <to...@gmail.com>:
> A portion of the web application I'm working on uses Comet to push updates
> to a client. These functions don't have access to a HttpServletRequest,
> only a RESTEasy AsynchronousResponse. Is there any way I can use the
> TilesContainer to render a definition without the HttpServletRequest? I'd
> love to be able to pass the container a definition and model and receive a
> string to put in the AsynchronousResponse.
You have to create two classes:
* one class that implements TilesRequestContext, that represents the "request".
* one class that implements TilesRequestContextFactory, that knows how
to build the previous request.
Such couples are already implemented for servlets, portlets, JSP,
FreeMarker and Velocity.
I've read rapidly the Javadocs, but I cannot understand a thing: how
do you access the "space" for attributes? (if any) And how do you
write to the response?
Antonio