Hello,

I want to do something that should be simple but appears to be complex.

I want to render a Block and return the result. The context is a website
in which I want to use Javascript to fill a <div>. I don't want to use a
zone for this. What I did was make a <t:block> in the .tml file. Now what I
want to do is send an event to the page, and return the rendered block
using JSON. A bit like this:

@Inject
private Block theBlock;

Object onTheEvent() {
    return theBlock;
}

I figured out that this doesn't work, because BlockImpl is not handled.
Okay, I have to return a StreamResponse. What I would like is:

@Inject
private final BlockRenderer renderer;

Object onTheEvent() {
    return new TextStreamResponse("text/html", renderer.render(theBlock));
}

Obviously the BlockRenderer service does not exist, but I would want it to
exist. Or something similar.

Who can help me out?

Tom.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to