PDA

View Full Version : store success property fail on empty response



mkysoft
13 Jul 2012, 5:36 AM
I am using Extjs 4.1. I configure my store reader success property. But when server side (php) send null reponse, on store load event, success paramerter is true. If response include success is false value it is working true. It is normal?

mkysoft
13 Jul 2012, 5:43 AM
I found in some code in Reader.js like this:
line: 352

success = true;
recordCount = 0;
records = [];

if (me.successProperty) {
value = me.getSuccess(data);
if (value === false || value === 'false') {
success = false;
}
}

When I debug this lines, value is setted to undefined. So
if (value === false || value === 'false') is working false.

scottmartin
13 Jul 2012, 3:54 PM
We could add a condition, but your server should always send T/F value .. not null response.

Scott.