Opened 11 years ago

Last modified 10 years ago

#13361 closed defect

Problem in ForestStoreModel after migrating from Dojo 1.3.0 to 1.6.1 — at Initial Version

Reported by: popeye Owned by: Jared Jurkiewicz
Priority: high Milestone: tbd
Component: Dijit Version: 1.6.1
Keywords: JSONRestStore ForestStoreModel Dojox Dijit Tree Cc: [email protected]
Blocked By: Blocking:

Description

Hi,

On Firefox 4.0, firebug send me "Error loading root children" and "TypeError?: _12.item is undefined" when trying to lazy-load the root childrens of a Tree (based on ForestModel? based on JsonRestStore?) but there's no problems in Dojo 1.3.0. On IE6, i have a "Out of Memory error on line 15" (no bugs with Dojo 1.3.0)

Is there any syntax change from 1.3.0 to 1.6.1 ? I tried other Dojo versions (1.6.0, 1.5, 1.4) but only 1.3.0 seems to be ok with this code.

Here's the code that populate my Dijit.Tree. The POST Response of my "navigate.php" page is always ok with every Dojo version.

var treeStore= new dojox.data.JsonRestStore?({

target: "navigate.php", idAttribute: "CODE", schema: { 'description':'Un noeud',

'type':'object', 'properties': { 'CODE': {'type':'number'},

'EST_DOSSIER': {'type':'number'}, 'LIBELLE' : {'type':'string'}}

}

});

var treeModel = new dijit.tree.ForestStoreModel?({

store: treeStore, rootId: 0, rootLabel: "Navigateur", query: { 'dossier': '0' }, labelAttr: "LIBELLE", childrenAttrs: children? });

dojo.addOnLoad(function() {

dojo.connect( treeModel, "getChildren", function( parentItem, complete_cb, error_cb ) {

if(parentItem.root)

return this.inherited(parentItem,complete_cb,error_cb);

var id = this.store.getValue(parentItem, 'CODE');

this.store.fetch({ query: { format: 'json', dossier: id }, onComplete: complete_cb, onError: error_cb });

}

);

Change History (0)

Note: See TracTickets for help on using tickets.