You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brent L Johnson <br...@bjohnson.net> on 2003/11/14 22:21:19 UTC

Database Actions

I've found many threads in this mailing list related to
"redirecting after XSP processing".  I'm trying to do pretty
much what most others were.. I dont want a "Your data has
been inserted" type page to serialize as output.  I just want it to
go back to a "listing" type page.

Basically from what I could gather from these threads was
basically this.. dont try redirecting after an XSP that uses
esql.. its ugly.. use database actions.

I read the docs I could find (on the Wiki and cocoon 2.1 docs)
and I learned a good bit about the db descriptor.  But I need
info on actual USAGE.  It seems to me that the request parameter
names must match the DB column names (unless I use a <mode> to
change it).. thats fine.

I just need a little nudge in the right direction for my
sitemap file.  I want to insert a row into a database (and later
change, and delete) then I want to jump to a new pipeline..
an existing pattern match that uses esql to read from the DB
and output the results (which will have new or changed data).

Listing Page -> Click Add.. Empty Add Page -> Insert into DB -> Listing
Page

Could someone send me a little snippet of what I need to put
into my sitemap to get this to work?  Or a pointer to a doc or
something that'll help out?

Thanks,

- Brent


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


Re: Database Actions

Posted by Andrzej Jan Taramina <an...@chaeron.com>.
> I just need a little nudge in the right direction for my
> sitemap file.  I want to insert a row into a database (and later
> change, and delete) then I want to jump to a new pipeline..
> an existing pattern match that uses esql to read from the DB
> and output the results (which will have new or changed data).
> 
> Listing Page -> Click Add.. Empty Add Page -> Insert into DB -> Listing
> Page
> 
> Could someone send me a little snippet of what I need to put
> into my sitemap to get this to work?  Or a pointer to a doc or
> something that'll help out?

Here is a snippet that would do the trick for the Insert into DB -> Listing 
Page part:

<map:pipeline>
	<map:match pattern="insertIntoDB.*">	
		<map:act type="dbms-update">
			<map:parameter name="table-set" value="Update"/>
			<map:redirect-to uri="cocoon:/ListingPage.*"/>
		</map:act>
		<map:redirect-to uri="cocoon:/html/updateFailed.html"/>
	</map:match>
</map:pipeline>


Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com


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