cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Hoechstaedter <j.hoechstaed...@memocomp.de>
Subject Update Database by DatabaseUpdateAction
Date Mon, 16 Jun 2008 09:05:55 GMT
Hi everybody,

I try an database update by request. As you maybe already can imagin: It 
doesn't work. The request url looks as follows:

http://localhost:8888/myBlock1/runsql/process?sql%3Auser_id=140&sql%3Aemail=DDeveloper%40home.com

It calls a pattern in my sitemap pieline. That works fine. Then I want 
cocoon to decode this url an write these data into my database. I 
already have an descriptor file where I added some attributes for my 
own. The file looks like:

<?xml version="1.0"?>
<root>
   <connection>personnel</connection>
   <table name = "user" alias="Table User">
           <title>
               Welcome to edit the user table
           </title>
           <description>
               Try description
           </description>
      <keys>
         <key mode="form" param="sql:user_id" name="user_id" alias="User 
Id (PK)" access="h" delim="," type="int" autoincrement="true">
            <mode name="auto"  type="autoincr"/>
         </key>
      </keys>
      <values deleteable = "true">
           <value access="r" delim="," mode="form" 
param="sql:login_name" name="login_name" alias="Login Name" 
type="string"></value>
           <value access="r" delim="," mode="form" 
param="sql:password_value" name="password_value" alias="PWD" 
type="string"></value>
         <value access="rw" delim="," mode="form" param="sql:email" 
name="email" alias="Email" type="string"></value>
         <value access="r" delim="," mode="form" param="sql:last_name" 
name="last_name" alias="Last Name" type="string"></value>
         <value access="r" delim="no" mode="form" 
param="sql:confirm_value" name="confirm_value" alias="Confirmation 
String" type="string"></value>
      </values>  
   </table>
</root>


 My sitemap components:

<map:actions>
            <map:action name= "dbUpdate" src= 
"org.apache.cocoon.acting.modular.DatabaseUpdateAction" />
</map:actions>

<map:pipeline>
<map:match pattern="runsql/process">
        <map:act type="dbUpdate">
            <map:parameter name="descriptor" 
value="resource/internal/sql/configuration/TURBINE_USER_descriptor.xml"/>
        </map:act>
        <map:serialize/>
</map:match>
</map:pipeline>

Whats wrong? Thank you in advance for any helpful answer.

Johannes

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


Mime
View raw message