cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject Re: MySQL "Year" vs CForms "Date"
Date Fri, 15 Feb 2008 06:32:45 GMT
Tobia
 
In terms of code - assuming I have a MySQL "Year-type" column;

Case 1:
<fd:field id="Year">
  <fd:label>Year</fd:label>
  <fd:datatype base="date"/>
</fd:field>	

Cocoon will not accept a form entry with just a "year" value (e.g. 2007)
and flags the entry field for the user to reenter the number.

Case 2:
<fd:field id="Year">
  <fd:label>Year</fd:label>
  <fd:datatype base="integer"/>
</fd:field>	

Cocoon 	will not accept this as a valid forms definition, when trying
to access the form via the browser.

As an interim solution I have used MySQL integer column, with 4 digits
and set a min/max range to the cocoon form widget.

>>> On 2008/02/14 at 04:32, in message <D5A8EB70-BEF7-4776-9B30-36E071DD74AB@linux.it>,
Tobia Conforto <tobia.conforto@linux.it> wrote:
Derek Hohls wrote:
> if I use MySQL "Year" column and Cocoon Forms "integer" type  
> together, then the forms validator complains that the widget is not  
> a date type.

This part I don't understand.  Are you trying to apply some sort of  
date widget or date formatting or date validation to the integer  
field?  (You shouldn't.)  What component "complains that the widget is  
not a date type"?  Does a simple integer text field work?


Tobia

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



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice,
and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Mime
View raw message