Ticket #2149648 (closed defect)

Reporter


sfbugs
Opened: 10/6/08
Last modified: 01/22/09
Status: closed
Type: defect
Resolution: wontfix

Owner


Jenny Donnelly
Target Release: 2.7.0
Priority: P3 (normal)
Summary: DataSource doesn't accept empty resultsList
Description:

parseJSONData now doesn't work if responseSchema.resultsList is empty, which it did in 2.5

Type: defect Observed in Version: 2.6.0
Component: DataSource Severity: S3 (normal)
Assigned To: Jenny Donnelly Target Release: 2.7.0
Location: Priority: P3 (normal)
Tags: Relates To:
Browsers:
URL:
Test Information:

Change History

George

YUI Developer

Posted: 10/6/08
  • summary changed from DataSource doesn't accept empty resultsList to [#2263549] DataSource doesn't accept empty resultsList

This bug report is being forwarded to the author or current owner of the affected component for additional investigation and response.

  • Username:
Posted: 11/25/08

We stumbled over the same problem and this issue is pretty critical as it makes YUI 2.6 competely unusable for us (aside from patching your guys' code).

If you acknowledge this we might be able to contribute a patch.

  • Username:
Posted: 11/26/08

In the meantime, the issue can be resolved by overriding doBeforeParseData as follows:

myDataSource.doBeforeParseData = function (oRequest, oFullResponse, oCallback) {
return {result:oFullResponse};
};

This will produce a non-empty response for the DataSource to parse. The responseSchema needs to be changed to:

myDataSource.responseSchema.resultsList = 'result';

The patch will work even if the bug is eventually fixed.

sfbugs

Posted: 01/7/09

This ticket was imported from Source Forge.

Orginially submitted by: devasatyam

George

YUI Developer

Posted: 01/22/09
  • browser changed to
  • location changed to
  • resolution changed from None to wontfix
  • severity changed to S3 (normal)
  • status changed from assigned to closed
  • testinfomation changed to http://

The component owner has reviewed this issue and provided the following feedback:

I'm still not convinced that this is worth fixing. As I posted to the forum,
declaring responseType as TYPE_JSARRAY and defining responseSchema.fields will
give implementers what they need. There is a lot of parsing logic handled by
the JSON parsing functionality that I don't want to overload with array parsing
functionality.

The change in behavior is regrettable but with proper documentation, I think it
is the right thing to do.