Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 58570 invoked by uid 500); 27 Jul 2001 18:16:28 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 58548 invoked from network); 27 Jul 2001 18:16:28 -0000 From: "Vadim Gritsenko" To: Subject: RE: [BUG C2] act method of Database Actions always return null Date: Fri, 27 Jul 2001 14:15:34 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: <3B6181A0.E375FDDF@apache.org> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > -----Original Message----- > From: Berin Loritsch [mailto:bloritsch@apache.org] > Sent: Friday, July 27, 2001 10:59 AM > To: cocoon-dev@xml.apache.org > Subject: Re: [BUG C2] act method of Database Actions always return null > > > Vadim Gritsenko wrote: > > > > Berin, > > > > I think that you as author of this actions know the answer on my question: > > > > I'm thinking of returning number of updated rows in Database[Update|Delete]Action as a result. > > Name of result parameter in the map would be "rows". Is it OK - should I commit the changes? > > Sure--as long as you keep two things in mind: > > 1) Never return a map if the query failed > 2) The returned map has substitution values for the sitemap. I doubt you will be > selecting stylesheets based on the number of rows updated. Perhaps it would > be better to set Request attributes instead. Makes perfect sence! Done. Return result is empty Map on success and row count as request attribute, "null" if nothing has been changed, and exception for all other cases. Vadim > > > > Thanks, > > Vadim > > > > > -----Original Message----- > > > From: Robert Marcano [mailto:robmv@promca.com] > > > Sent: Monday, July 23, 2001 2:45 PM > > > To: cocoon-dev > > > Subject: [BUG C2] act method of Database Actions always return null > > > > > > > > > The act method in org.apache.cocoon.acting.Action interface has the > > > following comment for the return value: > > > > > > The returned Map object with > > > sitemap substitution values which can be used > > > in subsequent elements attributes like src= > > > using a xpath like expression: src="mydir/{myval}/foo" > > > If the return value is null the processing inside > > > the element of the sitemap will > > > be skipped. > > > > > > the DatabaseUpdateAction and DatabaseDeleteAction, always return null, > > > so the contents of the map:act is never executed > > > > > > -- > > > Robert Marcano (robmv@promca.com) > > > System Architect > > > IBM OS/2, VisualAge C++, Java, Smalltalk certified > > > > > > aol/netscape screen id: robmv > > > jabber id: robmv@jabber.org > > > icq id: 101913663 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org