I also have an interest in this.

I would like a way of pre-rendering a Block on the server (as if it was rendered by an Ajax request handler), storing the rendered block as a JS variable in the page HTML and then injecting it into the DOM client side when it suits me. I don't want to have to make a new trip to the server to fetch the block via Ajax this is just a means of allowing a developer of parameterising his use of my overlay component.

As far as I can tell this requires two things:

1) a way of invoking the Ajax renderer programmatically on the server.
2) a way of invoking the Tapestry.init() function on the client with the pre-generated response which is stored in a javascript variable as an argument (similar to the updateFromUrl() function but with a client side variable instead). This will ensure that the content gets loaded into the client properly.

Steve

On 17 Jun 2009, at 21:42, Renger Wilde <busanalys...@yahoo.com> wrote:


On my client, I have a tabview.

When the user navigates to one of the tabs on the tabview, I trigger an AJAX request to obtain the content of that tab. The AJAX request is sent to a
Tapestry component event handler.

I want that event handler to invoke some other page or component, and cause
the rendered output of that other page/component to be captured into a
JSON-array, and sent back to the client as the reply to the AJAX request.

What is the best way to do this?

thanks.

Renger


--
View this message in context: 
http://www.nabble.com/How-to-render-a-page-as-JSON-formatted-AJAX-response--tp24081692p24081692.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


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

Reply via email to