cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Konovalov <oleg...@yahoo.com>
Subject Page iteration in Cocoon
Date Fri, 18 Nov 2005 22:03:42 GMT
Hi,

I am trying to implement the following enhancement
in Cocoon 2.0.4 project (with sitemap actions).

Imagine you have 2 databases (one is Master, one is Current).
Users can upload information from external Excel files given
by 3rd party companies (new, same, partially modified records).
So user uploads the new records to the Current database
and should be able to manually go through them (program
calculates
the difference between uploaded and existing records) 
and decide whether to Add, Change, Reject, Multi-Match 
or Ignore a record (can update just selective fields as well).

So we have Main Screen, user clicks on Change, sees a list of
records which do not match (ChangeRecs Screen), 
selects (one or a few of them) and Clicks on Change button
which brings him to Details screen (where he sees field by field
comparison of fields that record (current and updated) and
selects fields he wants to change.

As of now user can only select 1 record at a time, then in
brings
him back to the ChangeRecs screen.
Enhancement is in allowing to select a bunch of records
and iterate through all of them (with options to Update, Skip
one or Cancel the whole sequence).

1) Is there a sample of implementation such "page iteration" 
using sitemap actions?

2) Any sitemap iteractions constructs ?

3) Could you please suggest me how to design such thing ?
As of now, here is a core of the sitemap I have:

<map:match pattern="change_recs">
<map:act type='request'>
  <map:parameter name="parameters" value="true"/>
  <map:generate src='xml/change_query.xml'/>
  <map:transform type="sql">
	<map:parameter name="Id" value="{Id}"/>
	<map:parameter name="use-connection" value="mbrdb"/>
	<map:parameter name="show-nr-of-rows" value="true"/>	  
  </map:transform>
  <map:transform type="xslt" src="change_recs.xsl">
    <map:parameter name="use-request-parameters" value="true"		 
</map:transform>
  <map:serialize type="html"/>
</map:act>
</map:match>

part of changerecs.xsl :
<form name="ChangeRecs" id="ChangeRecs" method="post"
action="executeAction" onsubmit="some javascript checks">


<map:match pattern="executeAction">
  <map:act type='request'>
    <map:parameter name='parameters' value='true'/>
    <map:parameter name="default.industry_code" value="%"/>
    <map:act type="cda">
      <map:redirect-to uri="{../action}?params... &amp;ok=1"/>
    </map:act>
    <map:redirect-to uri="{action}?params...&amp;error=1"/>
  </map:act>
</map:match>

<map:action name="cda" src="ExecuteCDAAction"> Change-Delete-Add
<map:action name="request"
src="org.apache.cocoon.acting.RequestParamAction"/>

TIA,
Oleg.


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


Mime
View raw message