PDA

View Full Version : [FIXED] [4.2.1 beta] FieldSet fieldvaliditychange and fielderrorchange don't fire



Daniil
29 Apr 2013, 10:45 PM
REQUIRED INFORMATION

Ext version tested:

Ext 4.2.1 beta

Browser versions tested against:

Chrome
IE9

DOCTYPE tested against:

<!DOCTYPE html>

Description:

The Ext.form.FieldAncestor mixin is mixed into the Ext.form.FieldSet class, but it doesn't fire its "fieldvaliditychange" and "fielderrorchange" events.
The fieldDefaults (the Ext.form.FieldAncestor's member) option appears to be working.
Everything works for a FormPanel and a FieldContainer.

Steps to reproduce the problem:

Click the Button
Type in the TextFields

The result that was expected:

The "fieldvaliditychange" and "fielderrorchange" listeners execute for the FormPanel and FieldSet.

The result that occurs instead:

The "fieldvaliditychange" and "fielderrorchange" listeners execute for the FormPanel only, not for the FieldSet.

Test Case:


<!DOCTYPE html>
<html>
<head>
<title>FieldSet fieldvaliditychange and fielderrorchange don't fire</title>

<link rel="stylesheet" href="../resources/css/ext-all.css" />

<script src="../ext-all-debug.js"></script>

<script>
Ext.onReady(function () {
var formPanel,
fieldSet;

Ext.create("Ext.button.Button", {
renderTo: Ext.getBody(),
text: "setActiveError",
handler: function () {
fieldSet.child("textfield").setActiveError("test");
formPanel.child("textfield").setActiveError("test");
}
});

fieldSet = Ext.create("Ext.form.FieldSet", {
renderTo: Ext.getBody(),
title: "FieldSet",
items: [{
xtype: "textfield",
allowBlank: false
}, {
xtype: "textfield",
allowBlank: false
}],
listeners: {
fieldvaliditychange: {
fn: function () {
console.log("FieldSet fieldvaliditychange");
}
},
fielderrorchange: {
fn: function () {
console.log("FieldSet fielderrorchange");
}
}
}
});

formPanel = Ext.create("Ext.form.Panel", {
renderTo: Ext.getBody(),
title: "FormPanel",
items: [{
xtype: "textfield",
allowBlank: false
}, {
xtype: "textfield",
allowBlank: false
}],
listeners: {
fieldvaliditychange: {
fn: function () {
console.log("FormPanel fieldvaliditychange");
}
},
fielderrorchange: {
fn: function () {
console.log("FormPanel fielderrorchange");
}
}
}
});
});
</script>
</head>
<body>

</body>
</html>

mitchellsimoens
30 Apr 2013, 5:36 AM
Thanks for the report.

Nishantkmr
8 Jul 2013, 6:53 AM
Hi,

I am using EXTJS4.2.1 (Release Date: May 16, 2013, Version Number: 4.2.1.883).
When i am calling setActiveError and doLayout() on fieldContainer, I am unable to listen for fieldErrorChange on the form container which is parent of my fieldContainer. On the other hand fieldValidityChange event is working fine.

Please look into this issue.

rupamkhaitan
9 Jul 2013, 11:04 PM
I raised the issue to sencha team and they re-opened in EXTJSIV-10613 (https://support.sencha.com/index.php#)