Hybrid View
-
6 Jul 2012 6:36 PM #1
4.1.1 GA Form Submit Problem
4.1.1 GA Form Submit Problem
Test Case:
Validation.aspCode:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <link rel="stylesheet" type="text/css" href="Extjs/resources/css/ext-all.css"/> <script type="text/javascript" src="Extjs/bootstrap.js"></script> </head> <body> <script type="text/javascript"> Ext.onReady(function(){ if(Ext.BLANK_IMAGE_URL.substr(0,4)!="data"){ Ext.BLANK_IMAGE_URL="./images/s.gif"; } Ext.create("Ext.panel.Panel",{ title:"", width:400, height:400, renderTo:Ext.getBody(), bodyStyle:"background:#DFE9F6", layout:"hbox", defaults:{xtype:"form",bodyPadding:5, bodyStyle:"background:#DFE9F6",flex:1,height:350, url:"Validation.asp", defaultType:"textfield", fieldDefaults:{labelWidth:80, labelSeparator:":",anchor:"0" }, bbar:[ {text:"Save",handler:function(){ var f=this.up("form").getForm(); if(f.isValid()) f.submit({ waitMsg: "Save……", waitTitle: "Save", }); }} ] }, items:[ {title:"JSON", items:[ {fieldLabel:"field1",name:"field1"}, {fieldLabel:"field2",name:"field2",msgTarget:"side"}, {fieldLabel:"field3",name:"field3",msgTarget:"title"}, {fieldLabel:"field4",name:"field4",msgTarget:"under"}, {fieldLabel:"field5",name:"field5",msgTarget:"label1"}, {xtype:"label",id:"label1"} ]} ] }) }); </script> </body> </html>
Click save button,result:Code:<% Response.Charset="utf-8" Response.ContentType="text/javascript" %> { "success": false, "errors": { "field1": "requires" } }
1.PNG
-
6 Jul 2012 9:48 PM #2
Thank you for the report.
Scott.
-
6 Jul 2012 10:09 PM #3
-
6 Jul 2012 10:32 PM #4
Since it was working in RC2, you can have a look at that part of the code and create an override.
Scott.
-
6 Jul 2012 11:29 PM #5
Workaround is to add this override:
Code:Ext.define('Ext.form.SubmitFix', { override: 'Ext.ZIndexManager', register : function(comp) { var me = this, compAfterHide = comp.afterHide; if (comp.zIndexManager) { comp.zIndexManager.unregister(comp); } comp.zIndexManager = me; me.list[comp.id] = comp; me.zIndexStack.push(comp); // Hook into Component's afterHide processing comp.afterHide = function() { compAfterHide.apply(comp, arguments); me.onComponentHide(comp); }; }, /** * Unregisters a {@link Ext.Component} from this ZIndexManager. This should not * need to be called. Components are automatically unregistered upon destruction. * See {@link #register}. * @param {Ext.Component} comp The Component to unregister. */ unregister : function(comp) { var me = this, list = me.list; delete comp.zIndexManager; if (list && list[comp.id]) { delete list[comp.id]; // Relinquish control of Component's afterHide processing delete comp.afterHide; Ext.Array.remove(me.zIndexStack, comp); // Destruction requires that the topmost visible floater be activated. Same as hiding. me._activateLast(); } } });Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
14 Aug 2012 9:01 AM #6
Applying the patch
Applying the patch
This might be a newb question, but how to do you apply this patch?
do you simply copy paste it in your code and it should do the job?
Thanks
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-6745
in
4.1.2.



Reply With Quote