Re: [t5.3.1 - AjaxFormLoop] How to prevent removing the last row ?

2012-10-19 Thread Lance Java
You could fire some javascript (via JavaScriptSupport) in the onAddRow and onRemoveRow event handlers. The javascript could simply hide the remove link for the last row so the user can't click on it. -- View this message in context:

Re: [t5.3.1 - AjaxFormLoop] How to prevent removing the last row ?

2012-10-19 Thread Ditso
Isn't it more simple to just make sure in your loop source there is always 1 element. This way there is always one line available? -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-3-1-AjaxFormLoop-How-to-prevent-removing-the-last-row-tp5566078p5717053.html Sent from

Re: [t5.3.1 - AjaxFormLoop] How to prevent removing the last row ?

2012-10-18 Thread Muhammad Gelbana
Would it be easier to override the http return code ? I'm not sure if that's even possible but it would be easier to write a line of java code than to override the javascript stack I guess. On Thu, Oct 18, 2012 at 3:17 AM, Taha Siddiqi tawus.tapes...@gmail.comwrote: Hi The formLoopRemoveLink

Re: [t5.3.1 - AjaxFormLoop] How to prevent removing the last row ?

2012-10-18 Thread Taha Siddiqi
You can return HttpError but that will also result in a error alert. On Oct 19, 2012, at 2:50 AM, Muhammad Gelbana wrote: Would it be easier to override the http return code ? I'm not sure if that's even possible but it would be easier to write a line of java code than to override the

Re: [t5.3.1 - AjaxFormLoop] How to prevent removing the last row ?

2012-10-17 Thread Muhammad Gelbana
Am I lucky enough to get a positive answer now that we now reached v5.3.6 ? Thank you all :) On Wed, Mar 14, 2012 at 10:28 PM, Muhammad Gelbana m.gelb...@gmail.comwrote: Greetings to this magnificent mailing list and tapestry developers :) I have a perfectly operating ajax form loop but I'm

Re: [t5.3.1 - AjaxFormLoop] How to prevent removing the last row ?

2012-10-17 Thread Taha Siddiqi
Hi The formLoopRemoveLink does not check the return status but the removal is done only on a HTTP OK(200) status. You can override this js method with your custom logic. regards Taha On Oct 18, 2012, at 3:28 AM, Muhammad Gelbana wrote: Am I lucky enough to get a positive answer now that

[t5.3.1 - AjaxFormLoop] How to prevent removing the last row ?

2012-03-14 Thread Muhammad Gelbana
Greetings to this magnificent mailing list and tapestry developers :) I have a perfectly operating ajax form loop but I'm trying to find a way to prevent the user from removing the last row in the form. In an annotated method to handle the remove row events from the ajax form loop, I've done the