Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodySample , version: 2 on Tue 
Jul 15 14:36:33 2003 by BrunoDumon

- A field widget can be associated with a datatype. The function of the 
datatype is to convert the string value entered by the user to a more specific 
type like a number or a date (and vice versa, convert them back to strings). 
The datatype will also perform the validation. (This split-up between "widget" 
and "datatype" is specific for the field widget -- it is perfectly possible to 
make widgets that have nothing to do with datatypes). In this way, a field 
widget contains strongly-typed data. For example, if you associated a "long" 
datatype with a field widget, then you can be sure that when you retrieve the 
widget's value, you will get a Long object (that is, if the form was validated 
successfully).
+ A field widget can be associated with a datatype. The function of the 
datatype is to convert the string value entered by the user to a more specific 
type like a number or a date (and vice versa, convert them back to strings) 
(this part is now delegated to a seperate object: a Convertor). The datatype 
will also perform the validation. (This split-up between "widget" and 
"datatype" is specific for the field widget -- it is perfectly possible to make 
widgets that have nothing to do with datatypes). In this way, a field widget 
contains strongly-typed data. For example, if you associated a "long" datatype 
with a field widget, then you can be sure that when you retrieve the widget's 
value, you will get a Long object (that is, if the form was validated 
successfully).
?                                                                               
                                                                                
                                                                 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Reply via email to