cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malte Vahlenkamp" <Malte.Vahlenk...@bdal.de>
Subject Modular Database Actions - Multiple Inserts
Date Mon, 06 May 2002 06:44:27 GMT
Hello,

I have some problems with the modular database actions. I am trying to insert multiple rows
from a form with several text boxes named ProjectParam1, ProjctParam2, ... The insert itself
is runs, but all I get in this columns is a NULL value.  I already tried to solve this with
a wildcard [*] but maybe I messed up something with the syntax. Any comments?

Thanks for your time

  Malte


Heres is the mapping I defined for the database action:

=========================== SNIP ==================================
	
	<table name="projectparams" alias="projectparams">
		<keys>
			<key name="ProjectParamsId" autoincrement="true" type="int">
				<mode name="auto" type="autoincr"/>
			</key>		
		</keys>
		
		<values>
		<value name="ProjectId"  type="int" set="master">									
			<mode name="attribute" parameter="org.apache.cocoon.components.modules.output.OutputModule:projects.projectid[0]"
type="attrib"/>			
		</value>
		
		<value name="ParamName"  type="int">									
			<mode name="request" parameter="ParamName[*]" type="all"/>			
		</value>
		
		<value name="UnitName"  type="int">									
			<mode name="request" parameter="UnitName[*]" type="all"/>			
		</value>
		</values>
		
	</table>
		
	<table-set name="userAndProjects">
		<table name="projects"/>
		<table name="userprojects" others-mode="attrib"/>
		<table name="projectparams" others-mode="attrib"/>
	</table-set>

=========================== SNIP ==================================

And these are the request parameters

============================ SNIP =================================

<attributes>
<xsp-request:attribute-names>
<xsp-request:name>org.apache.cocoon.components.modules.output.OutputModule:userprojects.UserId[0]</xsp-request:name>
<xsp-request:name>org.apache.cocoon.components.modules.output.OutputModule:projectparams.ProjectParamsId[0]</xsp-request:name>
<xsp-request:name>org.apache.cocoon.components.modules.output.OutputModule:projectparams.ProjectId[0]</xsp-request:name>
<xsp-request:name>org.apache.cocoon.components.modules.output.OutputModule:projects.projectid[0]</xsp-request:name>
<xsp-request:name>org.apache.cocoon.components.modules.output.OutputModule:projects.userid[0]</xsp-request:name>
<xsp-request:name>org.apache.cocoon.components.modules.output.OutputModule:projects.ProjectName[0]</xsp-request:name>
<xsp-request:name>org.apache.cocoon.components.modules.output.OutputModule:userprojects.ProjectId[0]</xsp-request:name>
<xsp-request:name>org.apache.cocoon.action.modular.DatabaseAction.outputModeName</xsp-request:name>
</xsp-request:attribute-names>
	
</attributes>
	
<parameters>
<xsp-request:parameter-names>
<xsp-request:name>ProjectName</xsp-request:name>
<xsp-request:name>ProjectParamsId1</xsp-request:name>
<xsp-request:name>ProjectId</xsp-request:name>
<xsp-request:name>UserId</xsp-request:name>
<xsp-request:name>UnitName1</xsp-request:name>
<xsp-request:name>ParamName1</xsp-request:name>
</xsp-request:parameter-names>
	
</parameters>	

=================================== SNIP ====================================


---------------------------------------------------------------------
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