cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Problems with DatabaseXXXActions
Date Mon, 04 Mar 2002 12:00:11 GMT
C2.0 / TC 4.01 / Win2000

I am having problems getting a database form to work; the call to
form_chemicals.xsp
causes the error.xml page to be displayed.  I have set my log level to
WARN but cannot
see anything in the log reports as to where the problem might be?

In the sub-sitemap (in a dir called biotox) I have the match:

   <map:match pattern="forms/form_chemicals.xsp">
     <map:act set="dbentry">
       <map:parameter name="descriptor"
value="context://biotox/forms/desc_chemicals.xml" />
       <map:generate type="serverpages"
src="forms/form_chemicals.xsp"/>
       <map:transform src="styles/dbform.xsl"/>
       <map:serialize />
     </map:act>
     <!-- if action fails, then...-->
     <map:generate  src="docs/error.xml" />
     <map:transform src="styles/biotox-page2html.xsl"/>
     <map:serialize />    
   </map:match> 

with the action set:

 <map:action-sets>
  <map:action-set name="dbentry">
   <map:act type="add-dbentry" action="Add"/>
   <map:act type="del-dbentry" action="Delete"/>
   <map:act type="upd-dbentry" action="Update"/>
  </map:action-set>
 </map:action-sets>

and the actions:

  <map:actions>
   <map:action name="add-dbentry"
src="org.apache.cocoon.acting.DatabaseAddAction"/>
   <map:action name="del-dbentry"
src="org.apache.cocoon.acting.DatabaseDeleteAction"/>
   <map:action name="upd-dbentry"
src="org.apache.cocoon.acting.DatabaseUpdateAction"/>
   <map:action name="request"
src="org.apache.cocoon.acting.RequestParamAction"/>
   <map:action name="form-validator"
src="org.apache.cocoon.acting.FormValidatorAction"/>
<!-- abd others -->
  </map:actions>

The desc_chemicals.xml looks something like:

<?xml version="1.0"?> 
<root>
 <connection>biotox_chem_admin</connection>
 <table name="chemicals">
    <keys>
      <key param="ChemID" dbcol="ChemID" type="int" mode="manual"/>
    </keys> 
   <values>
     <value param="Name"  dbcol="Name" type="string"/>
<!-- and other columns in the same format -->
   </values>
 </table>
</root


WHAT I HAVE ALREADY TRIED:

   <map:match pattern="forms/form_chemicals.xsp">
       <map:generate type="serverpages"
src="forms/form_chemicals.xsp"/>
       <map:transform src="styles/dbform.xsl"/>
       <map:serialize />
   </map:match> 

this DOES work (displays form & data), so its not the XSP page or XSLT
that gives problems.
Also the  <connection>biotox_chem_admin</connection> in the
desc_chemicals.xml 
file is the same as that in the XSP page.




---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message