dijit tree and focus node -


I can not get the focus (node) or expandNode () are working I switch back to dojo 1.32 and 1.3 Also tried, there is no difference for 1.4. And I debug with firebug, the node is a valid tree node and there is no mistake, but the node does not focus on the help is greatly appreciated!

  & lt; Head & gt; & Lt; Script type = "text / javascript" & gt; Dojo.declare ("itcTree", [dijit.Tree], {focusNodeX: function (/ * string * / id) {var node = this._itemNodesMap [ID]; this.focusNode (node);}}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body class = "tundra" & gt; & Lt; Div dojoType = "dojo.data.ItemFileReadStore" jsId = "Continent Store" url = "countries.json" & gt; & Lt; / Div & gt; & Lt; Div dojoType = "dijit.tree.ForestStoreModel" jsId = "continentModel" store = "continent store" query = "{type: 'continent'}" rootId = "continental root" root label = "continent" children Attts = "children" & Gt; & Lt; / Div & gt; & Lt; Div dojoType = "itcTree" id = "mytree" model = "continent model" openOnClick = "true" & gt; & Lt; Script type = "dojo / method" event = "onClick" args = "item" & gt; Dijit.byId ('mytree') focusNodeX ('AF'). & Lt; / Script & gt; & Lt; / Div & gt; & Lt; P & gt; & Lt; Button onclick = "dijit.byId ('mytree'). Focuson ('de');" & Gt; Klick & lt; / Button & gt; & Lt; / P & gt; & Lt; / Body & gt;  

Focuson () takes a dijit.

Perhaps you want to use tree.ttr ("selected item", "de").


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -