-
24 Dec 2011 8:36 AM #1
Hidden form field
Hidden form field
If a form field is hidden
an exception is thrown:Code:{ xtype:'hidden', name:'UserID' }
maxLength is not defined
at
Code:function f1(out,values,parent,xindex,xcount) { try { with(values) { return(maxLength !== undefined) }} catch(e) {} }
-
24 Dec 2011 8:59 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
When do you get the error? Just displaying is fine for me:
Code:Ext.create('Ext.form.Panel', { renderTo : Ext.getBody(), width : 400, height : 400, title : 'Test', items : [ { xtype : 'hidden', //should use the more standard hiddenfield name : 'text' } ] });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
24 Dec 2011 9:51 AM #3
hiddend form field
hiddend form field
Interesting. Your panel worked for me also. It seems to fail when wrapped in a window:
Code:var dlPassChangeWin = Ext.create('Ext.window.Window', { width: 400, height: 400, title: 'Test', items: [ { xtype: 'hidden', //should use the more standard hiddenfield name: 'text' } ] }); dlPassChangeWin.show();
-
24 Dec 2011 10:01 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
And you are using 4.1 beta 1? I'm not getting any error using that code.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
24 Dec 2011 10:07 AM #5
Uhhg. I am. Unfortunately, all my forms are contained in windows and all that have hidden fields are throwing this error. I will try to isolate this outside my application.
-
24 Dec 2011 11:11 AM #6
I have no problem getting this exception outside my application using the code above.
Let me ask you this...
The error is wrapped in a try/catch block. The settings I am using is to break on all exceptions (caught or not).
Are you breaking only on uncaught exceptions or are you just not getting it at all?
-
24 Dec 2011 1:37 PM #7
It's a caught exception when testing the definedness of an optional value. Not a bug.
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
-
25 Dec 2011 6:46 AM #8
Throwing an exception to test the definedness of an optional value sounds crazy to me - but I guess that is a topic better discussed elseware.
Thanks for the info.


Reply With Quote