On Thu, 13 Jan 2011 13:24:32 -0200, Mark Shead <mark.sh...@xeric.net> wrote:

The documentation says that the event handler for an Ajax call can
return (among other things) a JSONObject.

Correct.

This lead me to believe that
I could replace: return new MultiZoneUpdate("totalPriceZone", totalPriceZone);

Not correct. The second parameter should be a component or a block. Zone and MuitiZoneUpdate are meant to be used without custom written JavaScript.

With something like:
return new JSONObject().put("totalPriceZone", getTotalPrice());
However, it doesn't appear that simply returning the JSON object will
trigger the update on the client side.  Should this work and if not
how can I get a JSONObject to update parts of the page?

Just return the JSONObject or JSONObject array directly.

--
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

Reply via email to