<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EstilCorreuElectrnic17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EstilCorreuElectrnic19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=CA link=blue vlink=purple id=MailContainerBody name="Compose message area"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hi Matt,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I’m trying to follow your suggestions but I didn’t get success.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>My code:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>new Ext.Viewport({<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> layout: "border",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> ...<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> items: [{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> region: "center",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> xtype: "gx_mappanel",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> id: "mappanel",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> map: map,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> layers: layerStore,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> zoom: 11,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> },{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> region: "west",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> id: 'west-panel',<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> layout: 'accordion',<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> defaults: {<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> // applied to each contained panel<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> bodyStyle: 'padding:5px'<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> },<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> layoutConfig:{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> animate: true<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> },<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> items: [{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> title: capes,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> id: 'lyrsTree',<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> xtype: "treepanel",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> loader: new Ext.tree.TreeLoader({<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> applyLoader: false<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> }),<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> rootVisible: false,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> autoScroll: true,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> root: {<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> children: createChildren()<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> }<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> },{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>....<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>var createChildren = function(){<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>return [{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>},{<o:p></o:p></span></p><p class=MsoNormal style='text-indent:35.4pt'><span style='color:#1F497D'>"nodeType": "gx_layer",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> "id": "tpnOrto",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> "layer": "topoorto",<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> "qtip": tooltipTopoorto,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> "text": lyrTopoorto,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> "icon": ""<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>},{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>....<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>var foo = Ext.getCmp('lyrsTree');<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>var foo2 = kk.getNodeById('tpnOrto');<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>foo2 = undefined<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Any idea or example how to get reference to the node directly or tree?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thanks in advance.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#0D0D0D'>Antoni Vidal</span></b><span style='color:#0D0D0D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:gray'>Unitat d'Aplicacions SIG-WEB<br><a href="http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392"><span style='color:gray'>Institut Cartogrāfic de Catalunya</span></a><br>Parc de Montjuīc, E-08038 Barcelona<br>Tel. (+34) 93 567 15 00 (ext. 3228)<br><a href="http://www.icc.cat/">www.icc.cat</a></span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Matt Priour [mailto:mpriour@kestrelcomputer.com] <br><b>Enviat:</b> lunes, 11 de abril de 2011 18:12<br><b>Per a:</b> Vidal, Antoni; users@geoext.org<br><b>Tema:</b> Re: [Users] How to get node from asynctreenode<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I don't see where you are defining any component with an id or 'tpnOrto'. Also when trying to retrieve nodes, it is better to use one of the node retrival methods rather than Ext.getCmp. I would suggest using either Ext.TreePanel.getNodeById, Ext.Node.findChild, or Ext.Node.findChildBy</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Hope that helps.</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Matt Priour</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Kestrel Computer Consulting</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><o:p> </o:p></span></p></div><div><div><p class=MsoNormal style='background:whitesmoke'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:antoni.vidal@icc.cat" title="antoni.vidal@icc.cat">Vidal, Antoni</a> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:whitesmoke'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Sent:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Monday, April 11, 2011 6:31 AM<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:whitesmoke'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>To:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:users@geoext.org" title="users@geoext.org">users@geoext.org</a> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:whitesmoke'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Subject:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> [Users] How to get node from asynctreenode<o:p></o:p></span></p></div></div></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></div><p class=MsoNormal>Hello list,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I would like to get a node from asynctreenode but I only get “undefined” and I can’t use disable() function.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My code:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>....<o:p></o:p></p><p class=MsoNormal>},{<o:p></o:p></p><p class=MsoNormal> "nodeType": "gx_layer",<o:p></o:p></p><p class=MsoNormal> "id": "toponimOrto",<o:p></o:p></p><p class=MsoNormal> "layer": "topoorto",<o:p></o:p></p><p class=MsoNormal> "text": “Toponimy”<o:p></o:p></p><p class=MsoNormal>},{<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>....<o:p></o:p></p><p class=MsoNormal>var foo = Ext.getCmp('tpnOrto');<o:p></o:p></p><p class=MsoNormal>console.info(foo);<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any suggestion?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thank’s in advance.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#0D0D0D'>Antoni Vidal</span></b><span style='color:#0D0D0D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:gray'>Unitat d'Aplicacions SIG-WEB<br><a href="http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392"><span style='color:gray'>Institut Cartogrāfic de Catalunya</span></a><br>Parc de Montjuīc, E-08038 Barcelona<br>Tel. (+34) 93 567 15 00 (ext. 3228)<br><a href="http://www.icc.cat/">www.icc.cat</a></span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div class=MsoNormal align=center style='text-align:center'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><hr size=2 width="100%" align=center></span></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>_______________________________________________<br>Users mailing list<br>Users@geoext.org<br>http://www.geoext.org/cgi-bin/mailman/listinfo/users<o:p></o:p></span></p></div></body></html>