PDA

View Full Version : [FIXED-1202] [3.3.1] updateRecord and getGroupValue



cumpa
1 Dec 2010, 1:59 AM
Hi all,
with the change for fix this (http://www.sencha.com/forum/showthread.php?109163-FIXED-1359-Ext.form.updateRecord%28%29-does-not-check-for-null-value-from-getValue%28%29&highlight=getgroupvalue) there is a problem if value is null



if (typeof value != undefined && value.getGroupValue) {
value = value.getGroupValue();
} else if ( field.eachItem ) {


first test (typeof value) is true (typeof value = "object")
second test (value.getGroupValue) fail (TypeError: value is null)

Thx
Cumpa

zachext
2 Dec 2010, 10:10 AM
Looks like 3.3.1 fix didn't catch the null condition. Here's an older thread which mentioned the issue. I updated the override for 3.3.1.

http://www.sencha.com/forum/showthread.php?107056

devtig
3 Dec 2010, 4:16 AM
I saw it too. The bug was reported here http://www.sencha.com/forum/showthread.php?109163 . Users proposed this solution:

if (Ext.type(value) !== false && value.getGroupValue) { ...

But the dev team decided to fix it with:

if (typeof value != undefined && value.getGroupValue) {

Which also in my opinion does catch null values which is the title of the bug report: Ext.form.updateRecord() does not check for null value from getValue()

meroy
3 Dec 2010, 11:33 PM
This has been fixed in SVN.