On Thu, 07 Jul 2011 01:25:39 -0300, Mark <mark-li...@xeric.net> wrote:
Is there a better way to construct a block from a string in Java than
this?
Block onShowDialogFromMoreInfo(TicketClass ticketClass) {
return new RenderableAsBlock(new
StringRenderable(person.getInfo()));
}
Do you really need it to be a block? To pass it to Delegate? It doesn't
need to be a block. It can also be a component or any object that
implements RenderCommand. Why don't you just return a RenderCommand
instance? Tapestry ultimately renders only RenderCommand's. Anything else
which can be rendered implements RenderCommand (including BlockImpl) or
converted to an instance of it.
--
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