cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Schwarz" <saschw...@hotmail.com>
Subject Basic Modular Database Add Question
Date Fri, 08 Aug 2003 18:56:04 GMT
Hi
I'm just not quite getting how to associate the posted form content to a 
modular database add action. So the action always sees nulls for all form 
fields when I submit.

I've defined the modular action in my sitemap with the name "insert"
My pipeline:

<map:match pattern="*-add">
     <map:act type="insert">
       <map:parameter name="descriptor" value="etc/db_config.xml"/>
    </map:act>
...<snip>generate select using SQLTransformer of full table contents</snip>
</map:match>

My form is:
<form name="contact" method="post" enctype="multipart/form-data" 
action="contact-add">
<table align="center">
<tr><td title="Mr, Mrs, Miss, Mme">Honorific:</td><td><input type="text"

rows="1" cols="32" name="honorific"></td></tr>
<tr><td title="First Name">First Name*:</td><td><input type="text"
rows="1" 
cols="32" name="firstName"></td></tr>
<tr><td title="Nickname">Other Name:</td><td><input type="text"
rows="1" 
cols="32" name="otherName"></td></tr>
<tr><td title="Last Name">Surname*:</td><td><input type="text"
rows="1" 
cols="32" name="surname"></td></tr>
<tr><td title="Junior, Senior, II, III">Lineage:</td><td><input
type="text" 
rows="1" cols="32" name="lineage"></td></tr>
<tr><td title="Primary email address">Email*:</td><td><input type="text"

rows="1" cols="32" name="email"></td></tr>
<tr><td title="Personal website">Website:</td><td><input type="text"

rows="1" cols="32" name="website"></td></tr>
<tr><td colspan="2">*Required fields</td></tr>
<tr><td colspan="2" align="center" height="40"><input type="submit" 
value="Add Contact" tabindex="1" class="input"></td></tr>
</table>
</form>

So if I request  http://localhost:8080/cocoon/contact-add I am served the 
page containing the form. I then fill in the form and submit it.

In the sitemap log I get lines like:
DEBUG   (2003-08-08) 13:22.36:950   [sitemap.action.insert] 
(/cocoon/contact-add) Thread-6/DatabaseAction: Trying
to set column contact.firstName from request-param using getAttribute method
DEBUG   (2003-08-08) 13:22.36:950   [sitemap.action.insert] 
(/cocoon/contact-add) Thread-6/DatabaseAction: Setting column 
contact.firstName [0] null

for each entry in the db_config.xml. Seems like the action is correctly 
reading my config file but I'm not configured correctly to get the data out 
of the post.

Obviously I'm missing a key concept...
Any help would be appreciated.
Steve

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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


Mime
View raw message