On Wed, 08 Dec 2010 20:55:27 -0200, Tim Koop <t...@timkoop.com> wrote:
I have a pile of Javascript on my page (it's a component really), and
sometimes it comes up with a value it needs to store on the server (in a
SessionState or something). Can someone please tell me the best way to
call the server from plain Javascript?
Create an event and pass its URL (created from
ComponentResources.createEventLink()) to your JavaScript code. Create a
event handler method for it. Request it using normal AJAX code from the
JavaScript side. If you need to return JSON, just return an JSONObject or
JSONArray instance in the event handler method. This works for pages,
componentes and mixins in the same way.
--
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