fermo111
7 Jul 2010, 11:48 PM
Ext version tested:
Ext 3.2.1
Adapter used:
ext
css used:
only default ext-all.css
Browser versions tested against:
FF 3.6.6
Operating System:
Ubuntu 8.04
Description:
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:
<html>
<head>
<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">
Ext.onReady(function(){
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});
}
}]
});
});
</script>
</head>
<body>
</body>
</html>
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"
Ext 3.2.1
Adapter used:
ext
css used:
only default ext-all.css
Browser versions tested against:
FF 3.6.6
Operating System:
Ubuntu 8.04
Description:
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:
<html>
<head>
<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">
Ext.onReady(function(){
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});
}
}]
});
});
</script>
</head>
<body>
</body>
</html>
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"