Roo/form/Form.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 10 Nov 2010 07:18:22 +0000 (15:18 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 10 Nov 2010 07:18:22 +0000 (15:18 +0800)
Roo/form/Form.js

index 056210a..50ae88f 100644 (file)
@@ -54,6 +54,16 @@ Roo.form.Form = function(config){
         rendered : true
     });
     
+    if (this.progressUrl) {
+            // push a hidden field onto the list of fields..
+            this.items.addxtype( {
+                    xns: Roo.form, 
+                    xtype : 'Hidden', 
+                    name : 'UPLOAD_IDENTIFIER' 
+            });
+        }
+        
+    
     Roo.each(xitems, this.addxtype, this);
     
     
@@ -244,7 +254,11 @@ Roo.extend(Roo.form.Form, Roo.form.BasicForm, {
      * @param {String/HTMLElement/Element} container The element this component should be rendered into
      * @return {Form} this
      */
-    render : function(ct){
+    render : function(ct)
+    {
+        
+        
+        
         ct = Roo.get(ct);
         var o = this.autoCreate || {
             tag: 'form',
@@ -255,14 +269,7 @@ Roo.extend(Roo.form.Form, Roo.form.BasicForm, {
 
         this.root.render(this.el);
         
-        if (this.progressUrl && !this.findField( 'UPLOAD_IDENTIFIER')) {
-            // push a hidden field onto the list of fields..
-            this.items.unshift( Roo.factory( {
-                    xns: Roo.form, 
-                    xtype : 'Hidden', 
-                    name : 'UPLOAD_IDENTIFIER' 
-            }));
-        }
+       
              
         this.items.each(function(f){
             f.render('x-form-el-'+f.id);