[Dojo-interest] store url that returns empty "items" list causes "this.headerContentNode.firstChild is null"

David M. Karr davidmichaelkarr at gmail.com
Thu Apr 2 15:31:41 EDT 2009


I have a read store connected to a grid.  I create them dynamically on 
request.  The read store gets a dynamic URL that returns JSON from the 
server.  Many of the results I get for specific URLs return JSON with a 
non-empty "items" list.  However, quite a few can return a JSON object 
with an empty "items" list.  When that happens, the "store.fetch()" call 
executes the "onError" callback with "TypeError: 
this.headerContentNode.firstChild is null" as the errData value.

For instance, here's a JSON result that doesn't cause a problem:

    
{"identifier":"date","items":[{"absenceId":1,"date":1220425200000}],"label":"date"}

Here's a JSON response that causes the error:

    {"identifier":"date","items":[],"label":"date"}


More information about the Dojo-interest mailing list