Hi,
I use the JSON below to create an ItemFileReadStore, which I then use to
create a ForestStoreModel, which I use to create a Tree. When I leave
out the 'months' property in the item with 'name' : 'RFE', it works
perfectly. But, when 'months' refers to an {}, I get the following error:
[Widget dijit.Tree, dijit_Tree_0] _connects=HTMLDivElement
_deferredConnects=Object : error loading root children: TypeError: _48
is undefined message=_48 is undefined
I've tried using:
{
'name' : 'RFE',
'type' : 'dataset',
'periodicities' : [ 'daily', 'dekadal', 'monthly' ],
'selectedPeriodicity' : 'monthly',
'units' : [ 'raw', 'percent', 'zscore', 'mmdifference', 'spi' ],
'selectedUnits' : 'raw',
'months' : {}
}
as a test, and this doesn't work, either. Is it permissible to have a
nested object in an item?
Here's the complete JSON:
{
identifier : 'name',
label : 'name',
items : [
{
'name' : 'All Africa',
'type' : 'region',
'children': [
{
'_reference' : 'RFE'
},
{
'_reference' : 'TPW'
},
{
'_reference' : 'NDVI'
},
{
'_reference' : 'WRSI'
}
]
},
{
'name' : 'East Africa',
'type' : 'region',
'children': [
{
'_reference' : 'RFE'
},
{
'_reference' : 'TPW'
},
{
'_reference' : 'NDVI'
},
{
'_reference' : 'WRSI'
}
]
},
{
'name' : 'West Africa',
'type' : 'region',
'children': [
{
'_reference' : 'RFE'
},
{
'_reference' : 'TPW'
},
{
'_reference' : 'NDVI'
},
{
'_reference' : 'WRSI'
}
]
},
{
'name' : 'South Africa',
'type' : 'region',
'children': [
{
'_reference' : 'RFE'
},
{
'_reference' : 'TPW'
},
{
'_reference' : 'NDVI'
},
{
'_reference' : 'WRSI'
}
]
},
{
'name' : 'RFE',
'type' : 'dataset',
'periodicities' : [ 'daily', 'dekadal', 'monthly' ],
'selectedPeriodicity' : 'monthly',
'units' : [ 'raw', 'percent', 'zscore', 'mmdifference', 'spi' ],
'selectedUnits' : 'raw',
'months' : {
'2003' : 'all',
'2004' : 'all',
'2005' : 'all',
'2006' : 'all',
'2007' : 'all',
'2008' : [ '1', '2', '3', '4', '5', '6', '7' ]
}
},
{
'name' : 'TPW',
'type' : 'dataset',
'periodicities' : [ 'daily', 'dekadal' ],
'selectedPeriodicity' : 'dekadal',
'units' : [ 'raw', 'percent' ],
'selectedUnits' : 'percent'
},
{
'name' : 'NDVI',
'type' : 'dataset',
'periodicities' : [ 'daily', 'monthly' ],
'selectedPeriodicity' : 'daily',
'units' : [ 'raw', 'percent', 'spi' ],
'selectedUnits' : 'spi'
},
{
'name' : 'WRSI',
'type' : 'dataset',
'periodicities' : [ 'dekadal', 'monthly' ],
'units' : [ 'raw', 'percent', 'zscore', 'spi' ],
'selectedUnits' : 'zscore'
}
]
}
Any thoughts?
Thanks!
Greg
--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
|
greg@...
| 360.774.6848
|
_______________________________________________
FAQ:
http://dojotoolkit.org/support/faqBook:
http://dojotoolkit.org/docs/bookForums:
http://dojotoolkit.org/forumDojo-interest@...
http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest