Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / source / DataField.html
index 358c062..d5ce317 100644 (file)
@@ -1,17 +1,12 @@
-<html>
-<head>
-  <title>The source code</title>
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body  onload="prettyPrint();">
-    <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.data.Field"></div>/**
+<html>\r
+<head>\r
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js"><div id="cls-Ext.data.Field"></div>/**
  * @class Ext.data.Field
  * <p>This class encapsulates the field definition information specified in the field definition objects
  * passed to {@link Ext.data.Record#create}.</p>
@@ -67,17 +62,16 @@ Ext.data.Field = function(config){
             case "int":
                 cv = function(v){
                     return v !== undefined && v !== null && v !== '' ?
-                           parseInt(String(v).replace(stripRe, ""), 10) : '';
+                        parseInt(String(v).replace(stripRe, ""), 10) : '';
                     };
                 break;
             case "float":
                 cv = function(v){
                     return v !== undefined && v !== null && v !== '' ?
-                           parseFloat(String(v).replace(stripRe, ""), 10) : '';
+                        parseFloat(String(v).replace(stripRe, ""), 10) : '';
                     };
                 break;
             case "bool":
-            case "boolean":
                 cv = function(v){ return v === true || v === "true" || v == 1; };
                 break;
             case "date":
@@ -100,7 +94,10 @@ Ext.data.Field = function(config){
                     var parsed = Date.parse(v);
                     return parsed ? new Date(parsed) : null;
                 };
-             break;
+                break;
+            default:
+                cv = function(v){ return v; };
+                break;
 
         }
         this.convert = cv;
@@ -161,7 +158,7 @@ var store = new Ext.data.Store({
     reader: new Ext.data.JsonReader(
         {
             idProperty: 'key',
-            root: 'daRoot',  
+            root: 'daRoot',
             totalProperty: 'total'
         },
         Dude  // recordType
@@ -246,13 +243,13 @@ sortType: function(value) {
      * <tt>"ASC"</tt>.
      */
     sortDir : "ASC",
-       <div id="cfg-Ext.data.Field-allowBlank"></div>/**
-        * @cfg {Boolean} allowBlank 
-        * (Optional) Used for validating a {@link Ext.data.Record record}, defaults to <tt>true</tt>.
-        * An empty value here will cause {@link Ext.data.Record}.{@link Ext.data.Record#isValid isValid}
-        * to evaluate to <tt>false</tt>.
-        */
-       allowBlank : true
-};</pre>
-</body>
+    <div id="cfg-Ext.data.Field-allowBlank"></div>/**
+     * @cfg {Boolean} allowBlank
+     * (Optional) Used for validating a {@link Ext.data.Record record}, defaults to <tt>true</tt>.
+     * An empty value here will cause {@link Ext.data.Record}.{@link Ext.data.Record#isValid isValid}
+     * to evaluate to <tt>false</tt>.
+     */
+    allowBlank : true
+};</pre>    \r
+</body>\r
 </html>
\ No newline at end of file