Re: How to implement an auto-save behavior

2014-02-11 Thread Boris Goldowsky
Thank you Martin, that works like a charm. Boris On Feb 10, 2014, at 2:27 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, To submit a form all you need to provide to the object you pass to Wicket.Ajax.ajax() is the 'f' attribute: Wicket.Ajax.post({ u: 'url/to/AjaxFormSubmitBehavior',

How to implement an auto-save behavior

2014-02-10 Thread Boris Goldowsky
I’m attempting to migrate an auto-saving behavior from wicket 1.5 to wicket 6. In wicket 1.5 it worked by doing something like this every 30 seconds to loop through auto-save-enabled forms on the page and submit them: $(form.ajaxAutoSave).each(function() { var form = $(this);

Re: How to implement an auto-save behavior

2014-02-10 Thread Ernesto Reinaldo Barreiro
Maybe Wicket.Ajax.Call.subitMultipartForm? On Mon, Feb 10, 2014 at 4:56 PM, Boris Goldowsky bgoldow...@cast.orgwrote: I'm attempting to migrate an auto-saving behavior from wicket 1.5 to wicket 6. In wicket 1.5 it worked by doing something like this every 30 seconds to loop through

Re: How to implement an auto-save behavior

2014-02-10 Thread Boris Goldowsky
Thanks, but that also results in Wicket.Ajax.Call.submitMultipartForm is not a function”. I suspect the answer is to get the parameters set up correctly and then arrange for the result of getCallbackScript() to be called periodically. If someone else has done something like this and has a

Re: How to implement an auto-save behavior

2014-02-10 Thread Ernesto Reinaldo Barreiro
Is not a function? If I look at the source code I see something like submitMultipartForm = function(context) { }, On Mon, Feb 10, 2014 at 5:41 PM, Boris Goldowsky bgoldow...@cast.orgwrote: Thanks, but that also results in Wicket.Ajax.Call.submitMultipartForm is not a function. I suspect

Re: How to implement an auto-save behavior

2014-02-10 Thread Martin Grigorov
Hi, To submit a form all you need to provide to the object you pass to Wicket.Ajax.ajax() is the 'f' attribute: Wicket.Ajax.post({ u: 'url/to/AjaxFormSubmitBehavior', f: 'formId', sc: 'optionalSubmittingComponentId'}); I will update the Ajax chapter in the Reference guide soon to explain the JS