View Full Version : [DUPE-865] RadioGroup/trackResetOnLoad still broken?

7 Jul 2010, 11:48 PM
Ext version tested:

Ext 3.2.1

Adapter used:


css used:

only default ext-all.css

Browser versions tested against:

FF 3.6.6

Operating System:

Ubuntu 8.04


According to the docs of the isDirty() method of Ext.form.BasicForm, isDirty() should return false after calling a setValues() if trackResetOnLoad=true. Instead, isDirty() returns always true after a setValues()

Test Case:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Checkbox / Radio Groups</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../adapter/ext/ext-base.js"> </script>
<script type="text/javascript" src="../../ext-all-debug.js"> </script>
<script type="text/javascript">

var fp = new Ext.FormPanel({
title: 'Radio Group',
trackResetOnLoad: true,
labelWidth: 110,
width: 600,
renderTo: document.body,
items: {
xtype: 'radiogroup',
fieldLabel: 'Auto Layout',
name: 'rb-auto', // not even listed in the docs!!!
items: [
{boxLabel: 'Item 1', name: 'rb-auto', inputValue: 1},
{boxLabel: 'Item 2', name: 'rb-auto', inputValue: 2, checked: true},
{boxLabel: 'Item 3', name: 'rb-auto', inputValue: 3},
{boxLabel: 'Item 4', name: 'rb-auto', inputValue: 4},
{boxLabel: 'Item 5', name: 'rb-auto', inputValue: 5}
buttons: [{
text: 'Is dirty ?',
handler: function () {
alert (fp.getForm().isDirty());
}, {
text: 'Set values',
handler: function () {
fp.getForm().setValues({'rb-auto': 5});

Steps to reproduce the problem:

click button ''Set values"
click button "Is dirty ?"

The result that was expected:

alert message saying "false"

The result that occurs instead:

alert message saying "true"

Jamie Avins
8 Jul 2010, 10:34 AM
Dupe: http://www.extjs.com/forum/showthread.php?97057-isDirty-on-radiogroup

A note on RadioGroup and CheckboxGroup: the issues relating to isDirty on these components have proven difficult to address without restructuring the form system and the way these two components were architected. We are going to address this properly in ExtJS 4.x, in the meantime we are trying to do what we can to work around these specific issues.

9 Jul 2010, 12:09 AM
Thanks Jamie

what is the suggested way to use them in the meantime?