cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Konovalov <>
Subject Query in the loop?
Date Mon, 05 Dec 2005 04:35:55 GMT

I am trying to enhance an existing Cocoon 2.0.4 app with sitemap

Application allows user to do a partial synchronization
of records in 2 databases (Current and Master) 
It is easy in case of Add, Delete, but not easy if they

On screen1 I show a list of mismatching records with checkboxes
(all have the same name, but different value=rowId, see below)
next to each of them (up to 200 per page). 
User is supposed to select many of them and synchronize selected
in bulk.
So I am creating a popup windows displaying all the fields
for all these mismatching record (to help user in making
decision which ones to process in bulk).
I have a query that returns me records from Current and Master
DB for 1 ID, but in that popup window I have to display that
info for all IDs selected on Screen1.

1) Is there a way to loop through the query and create a bunch
of resultsets rs1,rs2,rs3... to be displayed ?
Or do I have to have a Stored Procedure for that ?

2) How do I pass an array of IDs from XSL stylesheet for Screen1
to the query [in XML file] or stored proc ?

Any code sample ?

Please help Cocoon newbie !

Thank you in advance,

P.S.: Here is my current sitemap fragment for the popup:
<map:match pattern="dir1/popup1">
  <map:act type='request'>
    <map:parameter name="parameters" value="true"/>
    <map:generate src='xml/popup_query.xml'/>
    <map:transform type="sql">
	<map:parameter name="Id" value="{Id}"/>
	<map:parameter name="use-connection" value="mydb"/>
	<map:parameter name="show-nr-of-rows" value="true"/>
    <map:transform type="xslt" src="xslt/dir1/popup1.xsl">
	<map:parameter name="use-request-parameters" value="true"/>
    <map:serialize type="html"/>

<input name="v1" type="checkbox"> 
  <xsl:attribute name='value'><xsl:value-of

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message