PDA

View Full Version : [FIXED-EXTJSIV-902][B2] clearInvalid method missing from Ext.form.FieldContainer



conorarmstrong
11 Apr 2011, 10:26 AM
The clearInvalid method seems to be missing from the the code from Ext.form.FieldContainer.

This causes problems when using radiogroups (amongst others) in forms. Error generated is "f.clearInvalid is not a function"

Problem can be solved by adding the missing method to the Ext.form.FieldContainer definition. My version as follows:



clearInvalid: function() {
Ext.each(this.items, function(item) {
if (item.clearInvalid) {
item.clearInvalid();
}
});
}


I think this issue has already been raised in the Ext4 help forum, but I believe it may be actually be a bug - hence repost here...

jjohnston
12 Apr 2011, 12:49 PM
Thanks for reporting, this has been fixed.

FYI the final fix does not add the method to FieldContainer, rather to the Field mixin as part of its interface. Since FieldContainer does not implement Field, it does not need the methods. CheckboxGroup, however, does implement Field so the methods were added to it.

conorarmstrong
13 Apr 2011, 7:20 AM
good man! looking forward to next release already! ;-)

simon_says
30 Apr 2012, 9:56 AM
Hi, this is an old thread but I'm experiencing the same issue in v3.4. Firebug shows the clearInvalid function is available for the standard input field, however calling it returns f.clearInvalid is not a function. I'd appreciate it if someone could explain how I can patch this.

Thanks!

<br><br>
Thanks for reporting, this has been fixed.<br>
<br>
FYI the final fix does not add the method to FieldContainer, rather to the Field mixin as part of its interface. Since FieldContainer does not implement Field, it does not need the methods. CheckboxGroup, however, does implement Field so the methods were added to it.