[Dojo-interest] JSONRestStore lazyload

Cosmo Scrivanich cscrivanich at mysck.com
Fri Jul 17 11:30:45 EDT 2009


Just curious how you are initiating your question.  Are you posting to a
forum topic or sending a email to some dojo help email id?  Only asking
because recently I posted to a forum and didn't get a email about it,
and had no responses.  I thought there might be a better way to ask
questions. 

-----Original Message-----
From: dojo-interest-bounces at mail.dojotoolkit.org
[mailto:dojo-interest-bounces at mail.dojotoolkit.org] On Behalf Of Kris
Zyp
Sent: Friday, July 17, 2009 11:22 AM
To: dojo-interest at mail.dojotoolkit.org
Subject: Re: [Dojo-interest] JSONRestStore lazyload

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 


Jean-Rubin Leonard wrote:
> Hi, When I'm trying to implement the lazyload, the first level loads 
> correctly. As Kris said, it does do one load item for each underlying 
> child node, it would be nice that it doesn't. It would be more 
> efficient. Just my two cents. I am having a problem with the child 
> nodes however. Although I seem to be returning the correct data, the 
> child nodes are labeled undefined and there doesn't seem to be 
> anything I can do to get the correct data to be showing in the tree. 
> Here is what my first level returns:
> [{"scenario_id":"1","node_id":"0","node_type":"scenario","node_name":"
> Budget
>  Version 1","children":[
> {"$ref":"6"},{"$ref":"31"}]},{"scenario_id":"2","node_id":"40","node_t
> ype":"scenario","node_name":"Budget
>  version
>
2","children":[{"$ref":"42"}]},{"scenario_id":"3","node_id":"43","node_t
ype":"scenario","node_name"
>  :"New product Launch","children":[{"$ref":"44"}]}]
>
> All the node names appear with the correct number of children but the 
> children are leaf nodes labelled undefined. When I look at what is 
> returned by the call to children (say for $ref:31) I have the 
> following information on firebug:
> [{"scenario_id":"1","node_id":"31","node_type":"Cost center 
> group","node_name":"ING","children":[{"$ref"
> :"32"},{"$ref":"33"},{"$ref":"34"}]}]
>
> Is there something wrong with my data? My tree has "node_name" as the 
> label attribute.
Your tree has "node_name" as the label attribute? Your store needs to
have the "labelAttribute" property set to "node_name". Also, when JRS
does a GET for /31, it expects to get an object in response:

{"scenario_id":"1","node_id":"31",...


- --
Kris Zyp
SitePen
(503) 806-1841
http://sitepen.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iEYEARECAAYFAkpglxEACgkQ9VpNnHc4zAyGuACgwivx7jU1UJxp0TwBzAPiN+wo
8N4An0JH9r8EscDa90/tHs3ju3p9/OC+
=tL9n
-----END PGP SIGNATURE-----

_______________________________________________
FAQ: http://dojotoolkit.org/support/faq
Book: http://dojotoolkit.org/docs/book
Forums: http://dojotoolkit.org/forum
Dojo-interest at mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


More information about the Dojo-interest mailing list