cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo Rivera <agalla...@agsoftware.dnsalias.com>
Subject mod-db example not working.
Date Wed, 16 Oct 2002 13:53:40 GMT
I am trying to start the example of mod-db using PostgreSQL.

Currently, I have the autoincr, working, but the problem now is inserting a 
new row in the table "groups" - the easier one ;).

In the database.xml there is defined as:

<table name="groups">
	<keys>
		<key name="gid" type="int" autoincrement="true">
			<mode name="auto" type="autoincr"/>
		</key>
	</keys>
	<values>
		<value name="gname" type="string"/>
	</values>
</table>

Also....

<table-set name="groups">
	<table name="groups"/>
</table-set>

In the userlist.xsp there is a form that handle the new-group action:

<sqltblrow>
  <gname>
    <form>
      <input type="text" name="groups.gname" size="20" maxsize="20"/>
      <input type="submit" name="add-group" value="new group"/>
   </form>
 </gname>
</sqltblrow>

But when I try to Add a new group, It cannot get the groups.gname parameter. 
It store a null. In the sitemap.log I found the following:

Current Sitemap Parameters:
LEVEL 2
PARAM: 'add-group' VALUE: 'new group'
PARAM: 'groups.gname' VALUE: 'wsqa'
LEVEL 1
PARAM: '../0' VALUE: 'user-list'
PARAM: '../1' VALUE: 'user-list'

Thread-9/DefaultComponentFactory: ComponentFactory creating new instance of 
org.apache.cocoon.acting.modular.DatabaseAddAction.
Thread-9/DefaultComponentFactory: no logger attribute available, using 
standard logger

Thread-9/AbstractComplementaryConfigurableAction: (Re)Loading database.xml
Thread-9/DatabaseAction: modeTypes : {1=others, 2=attribute, 0=autoincr}
Thread-9/DatabaseAction: i=0
Thread-9/DatabaseAction: requested mode was "autoincr" returning "autoincr"
Thread-9/DatabaseAction: i=1
Thread-9/DatabaseAction: requested mode was "others" returning "others"
Thread-9/DatabaseAction: query: INSERT INTO groups (gname) VALUES (?)
Thread-9/DatabaseAction: Trying to set column groups.gname from request using 
getAttribute method
Thread-9/DatabaseAction: Setting column groups.gname [0] null
Thread-9/DatabaseAction: ====> row no. 0
Thread-9/DatabaseAddAction: Automatically setting key
Thread-9/DatabaseAction: Setting column groups.gname[0] to null
Thread-9/DatabaseAction: Could not select output mode attribute:null
Thread-9/DatabaseAction: Setting column groups.gid[0] to 10
Thread-9/DatabaseAction: Could not select output mode attribute:null
Thread-9/DatabaseAction: Could not select output mode attribute:null
Thread-9/DefaultComponentFactory: ComponentFactory decommissioning instance of  
org.apache.cocoon.acting.modular.DatabaseAddAction.

Also, the sitemap is:

      <!-- add own new group -->
      <map:act type="req-params">
         <map:parameter name="parameters" value="add-group groups.gname"/>
         <map:act type="mod-db-add">
           <map:parameter name="table-set" value="groups"/>
         </map:act>
      </map:act>


Please help,

Regards,

Antonio Gallardo.

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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