Opened 12 years ago

Last modified 7 years ago

#10764 closed defect

Tree in an AccordionPane not yet focused will call fetch() from its store and render itself — at Initial Version

Reported by: OakBehringer Owned by:
Priority: low Milestone: 1.13
Component: Dijit Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

Bill Keese asked me to log this here.

A tree in an AccordionPane? that is not yet focused will call fetch() from its store and render itself. I would like to defer this behavior until the pane is focused. It makes sense as the data is not yet used, it shouldn't be requested until needed.

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="/js/src/dijit/themes/tundra/tundra.css" /> <link rel="stylesheet" type="text/css" href="/js/src/dijit/themes/dijit.css" /> <script type="text/javascript" src="/js/src/dojo/dojo.js" djConfig="parseOnLoad:true"></script> <script type="text/javascript">

dojo.require('dijit.layout.AccordionContainer?'); dojo.require('dojo.data.ItemFileReadStore?'); dojo.require('dijit.Tree'); dojo.addOnLoad(function(){

var store = new dojo.data.ItemFileReadStore?({ url: "/url/doesnt/matter/" }); var treeModel = new dijit.tree.ForestStoreModel?({

store: store, query: { "type": "continent" }, rootId: "root", rootLabel: "Continents", childrenAttrs: children?

}); new dijit.Tree({ model: treeModel }, "treeOne");

});

</script>

</head> <body class="tundra">

<div dojoType="dijit.layout.AccordionContainer?" style="height: 400px;">

<div dojoType="dijit.layout.AccordionPane?" title="Pane1">

The tree in Pane 2 attempts to render / call store.fetch() before scrolling into view.<br /> (the url for the store will fail, but it still demonstrates that fetch has been called)

</div> <div dojoType="dijit.layout.AccordionPane?" title="Pane2"><div id="treeOne"></div></div>

</div>

</body> </html>

Our discussion can be read here:

http://n3.nabble.com/Declarative-According-Child-Widgets-Not-Started-Up-td195721.html

I'm not sure if this is a bug or feature request, but Bill made it seem like a bug.

Change History (0)

Note: See TracTickets for help on using tickets.