The JSON response is only recognized for Ajax requests; Tapestry differentiates between traditional requests and Ajax requests when handling the return value from an event handler method.
When you use the zone parameter of an action link, Tapestry adds JavaScript to observe the click event on the client side, and to send an Ajax request to the server, and then update the zone's content based on the reply. If you want to do other kinds of Ajax updates, you need to write your own JavaScript code to observe the click event, send the Ajax request and interpret the response. On Sat, Oct 25, 2008 at 9:41 AM, Ben Gidley <[EMAIL PROTECTED]> wrote: > Hi, > I read the page on AJAX on the website and it implies I can return a > JSONObject directly from an event (if it is called via ajax). > > However when I implemented this - I got an error saying it didn't know what > to do with a JSON object. It does work if you encode the JSON response via a > TextStreamResponse. > > Is this a bug? - Or am a I missing something? > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]