cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerry Kaplan" <gkap...@prolifics.com>
Subject DateInputModule
Date Wed, 27 Oct 2004 13:30:04 GMT
I am trying to create a sitemap that, after validating a form, will add the
fields to a MySQL database. The database definitions are as follows:

<root>
   <connection>imweb</connection>
 
   <table name="reports" alias="reports">
      <keys>
         <key name="ReportId" type="int" autoincrement="true">
            <mode name="auto"  type="autoincr"/>
         </key>
      </keys>
      <values>
         <value name="UserId"  type="string"></value>
            <mode name="session-attr" type="all">
               <parameter>userId</parameter>
            </mode>
         <value name="ReportRef" type="string"></value>
         <value name="PatName"  type="string"></value>
         <value name="CreationDate" type="time-stamp"></value>
         <value name="ModifiedDate" type="time-stamp"></value>
         <value name="ExamDate"  type="date"></value>
         <value name="ReportXML" type="blob"></value>
      </values>   
   </table>
 
   <table-set name="add-report">
      <table name="reports"/>
   </table-set>
</root>

2 questions:

1. How can I populate "CreationDate" and "ModifiedDate" with the current
datetime (timestamp). I cannot find a good example of how to use the
DateInputModule with a database.

2. In the above example, I have specified the "mode" tag on the UserId
value. Is it possible that this be placed in the table-set instead of the
table definition?

Thanks in advance!

Gerry


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


Mime
View raw message