I think this (passing a JavaScript parameter from the server side) is not recommended anyway. Create this function in some .js file which you include in your page or component then pass options.put("start", new JSONLiteral("nameOfTheFunction"));

On Thu, 20 Mar 2014 10:15:05 -0300, john c <john998...@yahoo.com> wrote:

With <t:jquery.Draggable /> you can specify the JSONObject params like so: t:params="params"
In Java I have code like this (snippet):

public JSONObject getParams() {
JSONObject options = new JSONObject();
......
......
options.put("start", "function() {$(this).hide();}");
return options;
}

This "start" option does not seem to work as a String. I have tried JSONLiteral but it failed also. I got a Ajax error, something like Communication with the server failed, null.

I also tried in the tml -- t:params="literal:{start: function() {$(this).hide();}}"

But it does not work. In both cases above I tried with arguments: function(event, ui) {}, but it did not work.

How can I declare this function ??

Thanks.
Reply, Re


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.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