options.put("start", new JSONLiteral("function() {$(this).hide();}"));
is the right way to pass the function, but it won't work for AJAX requests in tapestry 5.4. Could you please tell us what version of tapestry, tapestry-jquery you are using? And provide the stacktraces so we can debug further. On Thu, Mar 20, 2014 at 2:15 PM, 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