You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dmitry Gusev <dm...@gmail.com> on 2013/04/07 20:33:35 UTC
Example of how to render Tapestry5 block from Service
FYI:
http://dmitrygusev.blogspot.ru/2013/04/render-tapestry5-block-to-string-from.html
--
Dmitry Gusev
AnjLab Team
http://anjlab.com
Re: Example of how to render Tapestry5 block from Service
Posted by Dmitry Gusev <dm...@gmail.com>.
Hi,
I agree this looks like a hack, but in order to render a page/block
you should provide a "context" for it to be rendered.
So you can't just call RenderCommand.render() because it says nothing about
the context.
In tapestry5 you provide such context for pages/components in event context
via event handler methods.
On Sun, Apr 7, 2013 at 10:54 PM, Dragan Sahpaski
<dr...@gmail.com>wrote:
> Commenting doesn't seem to work.
> I've done it exactly like that at times but it still seems like hacking
> the ComponentEventRequestHandler which is for handling component events.
> Since BlockImpl is a RenderCommand can something similar and cleaner
> be accomplished by using a custom MarkupWriter and a Render queue by just
> invoking RenderCommand.render for each RenderCommand in the Block, cause
> the Block is just a list of RenderCommands?
>
> Cheers,
> Dragan Sahpaski
>
>
> 2013/4/7 Dmitry Gusev <dm...@gmail.com>
>
> > FYI:
> >
> >
> >
> http://dmitrygusev.blogspot.ru/2013/04/render-tapestry5-block-to-string-from.html
> >
> > --
> > Dmitry Gusev
> >
> > AnjLab Team
> > http://anjlab.com
> >
>
--
Dmitry Gusev
AnjLab Team
http://anjlab.com
Re: Example of how to render Tapestry5 block from Service
Posted by Dragan Sahpaski <dr...@gmail.com>.
Commenting doesn't seem to work.
I've done it exactly like that at times but it still seems like hacking
the ComponentEventRequestHandler which is for handling component events.
Since BlockImpl is a RenderCommand can something similar and cleaner
be accomplished by using a custom MarkupWriter and a Render queue by just
invoking RenderCommand.render for each RenderCommand in the Block, cause
the Block is just a list of RenderCommands?
Cheers,
Dragan Sahpaski
2013/4/7 Dmitry Gusev <dm...@gmail.com>
> FYI:
>
>
> http://dmitrygusev.blogspot.ru/2013/04/render-tapestry5-block-to-string-from.html
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>