On Fri, 10 Sep 2010 08:47:03 -0300, Everton Agner <ton.ag...@gmail.com>
wrote:
Hi!
Hi, Everton!
- How can I make an Ajax call to some method on the Page? Is there any
component that could act like a bridge for it? And I need to write JSON
as response, and I don't wanna create a Servlet just for that purpose.
See http://tapestry.apache.org/tapestry5.1/guide/ajax.html, section "Your
own AJAX components".
It's easy:
* Define an event name
* Create an event handler method that handles this event and returns
JSONObject or JSONArray
* Inject ComponentResources
* Make your JavaScript request the URL created by
ComponentResources.createEventLink().
--
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