On Wed, 05 Oct 2011 14:19:31 -0300, Ulrich Stärk <u...@spielviel.de> wrote:
This is obviously much better than fiddling with internal stuff if it
suffices your needs.
I don't think internal stuff is needed for both of the solutions. A
RenderCommand (which isn't internal) can be implemented and it receives
the MarkupWriter (so you can render DOM elements) and the RenderQueue (so
you can add other RenderCommands to the rendering queue). BlockImpl, the
implementation of the Block interface, also implements RenderCommand, so
rendering a block it's just a matter of doing a cast and pushing it into
the queue. You can also return a RenderCommand in render event handler
methods and they'll be rendered (i.e. executed).
Maybe few people know, but Tapestry's DOM rendering is completely based on
RenderCommand. Everything which is rendered in Tapestry is a RenderCommand
or provides one some way (components and pages, for example, through
ComponentResources.getBody());. It's almost a hidden gem. :)
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org