Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 598 invoked from network); 30 Aug 2005 14:16:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Aug 2005 14:16:21 -0000 Received: (qmail 67000 invoked by uid 500); 30 Aug 2005 14:16:20 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 66617 invoked by uid 500); 30 Aug 2005 14:16:19 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 66603 invoked by uid 99); 30 Aug 2005 14:16:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2005 07:16:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [132.230.150.3] (HELO atlas.informatik.uni-freiburg.de) (132.230.150.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2005 07:16:33 -0700 Received: from eradior.informatik.uni-freiburg.de ([132.230.152.161]) by atlas.informatik.uni-freiburg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.51) id 1EA6uO-00001h-6l for dev@cocoon.apache.org; Tue, 30 Aug 2005 16:16:16 +0200 Message-ID: <43146A2F.7020309@guschtel.de> Date: Tue, 30 Aug 2005 16:16:15 +0200 From: Christoph Hermann User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Repost from users list: Cforms Repeater - Cancel delete action via javascript References: <4314115F.7060404@guschtel.de> <4314163D.9000002@apache.org> <43145F87.1000201@guschtel.de> <431466F2.7020205@apache.org> In-Reply-To: <431466F2.7020205@apache.org> X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sylvain Wallez schrieb: Hello, >> Maybe the Cocoon Code c(sh)ould be changed to make this possible? >> Imho it would be very "natural" to allow the javascript to cancel the >> action. >> And it shouldn't be too difficult to implement this. > I thought about it as well, but it's not as easy as it seems though. The > moment where the event listeners are called depends on the action type > [...] > So allowing event listeners to cancel the action would require to change > this behaviour, which was designed to allow listeners to take > complementary actions to the main one. > > In the end, my opinion is that if conditional action is needed, then > it's better to write the few corresponding lines in a regular fd:action > that has no built-in behaviour like row-actions and repeater-actions do. Yes your right, but thing is that the action does not trigger the validation process. I tried form.validate() and form.endProcessing(true); and didn't success, and i don't have the time atm to investigate this any further. What i'd like to do is to trigger a validationError if the wrong row shall be deleted. Christoph