[Dojo-interest] Lazy loading tree does not send get request

Bill Keese bill at dojotoolkit.org
Fri Aug 19 04:46:57 EDT 2011


Hmm, not sure why it's not working for you, we have a test case in
dijit/tests/tree/Tree_with_JRS.html that seems to be OK.    Although
it's running against the file system, you can see the GET's.

On Fri, Aug 12, 2011 at 1:28 AM, batter <basven at yahoo.com> wrote:
> I am playing around with the JSONRestStore and using the ForestModel to lazy
> load my data.
> I see that my first request makes it to the server and the tree displays
> that as a container (i.e it recognizes there are children below it).
> However when I click on the container, no subsequent request is made to the
> server side to load the data.
> Here a snippet of the client side:
>                        dojo.addOnLoad(function(){
>
>                                var myStore = new dojox.data.JsonRestStore({
>                                        target:"/RestExplorerTree",
>                                        labelAttribute:"name",
>                                        idAttribute: "uuid",
>                                        allowNoTrailingSlash: true
>                                        });
>
>
>                                var myModel = new dijit.tree.ForestStoreModel({
>                                        store: myStore,
>                                        deferItemLoadingUntilExpand: true,
>                                        query: "?uuid=1",
>                                        childrenAttrs: ["children"]
>                                        });
>
>                                var myTree = new dijit.Tree({model: myModel}, 'container');
>                                myTree.startup();
>                        });
>
> And the data that gets returned when the initial request is sent:
>
>  [{"name":"My Root",
>   "children":[{"name":"Public
> Folders","children":true,"$ref":"/content","type":"content"},
>               {"name":"My Folders","$ref":"/folder","type":"folder"}],
>   "uuid":"1",
>   "type":"product"
> }]
>
> When clicking on the 'My Root' container, no request is sent anymore to the
> server side (nor are the children displayed).
>
>
>
> --
> View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Lazy-loading-tree-does-not-send-get-request-tp3246443p3246443.html
> Sent from the Dojo Toolkit mailing list archive at Nabble.com.
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>


More information about the Dojo-interest mailing list