cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [BUG C2] act method of Database Actions always return null
Date Fri, 27 Jul 2001 14:58:40 GMT
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.
> 
> 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 <code>Map</code> 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 <map:act> 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
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message