<div dir="ltr">Hello all,<table><tbody><tr><td>
<br></td>
<td>
<div>
<div>
<p>I'm using GeoExt (based on ExtJs) to create a tree. In each
node I want the corresponding image at left instead of the default image
<img src="http://i.stack.imgur.com/3XI5p.png" alt="default image"> like <a href="http://todosmiscomercios.com.ar/" rel="nofollow" target="_blank">this site</a>. How can <font>I do</font> it?</p>Here is part of my code:<pre>
<code><span>var</span><span> bpn </span><span>=</span><span> </span><span>new</span><span> </span><span>OpenLayers</span><span>.</span><span>Layer</span><span>.</span><span>WMS</span><span>(</span><span>"bpn"</span><span>,</span><span>
url</span><span>,</span><span>
</span><span>{</span><span>
LAYERS</span><span>:</span><span> </span><span>[</span><span> </span><span>'Año 2004'</span><span>,</span><span> </span><span>'Año 2005'</span><span>,</span><span> </span><span>'Año 2006'</span><span>,</span><span> </span><span>'Año 2007'</span><span>,</span><span> </span><span>'Año 2009'</span><span>],</span><span>
format</span><span>:</span><span> </span><span>"image/png"</span><span>,</span><span>
transparent</span><span>:</span><span> </span><span>"true"</span><span>,</span><span>
projection</span><span>:</span><span> </span><span>'EPSG:4326'</span><span>
</span><span>},</span><span>
</span><span>{</span><span>
buffer</span><span>:</span><span> </span><span>0</span><span>,</span><span>
displayOutsideMaxExtent</span><span>:</span><span> </span><span>true</span><span>,</span><span>
isBaseLayer</span><span>:</span><span> </span><span>false</span><span>,</span><span>
displayInLayerSwitcher</span><span>:</span><span> </span><span>false</span><span>,</span><span>
yx</span><span>:</span><span> </span><span>{</span><span>'EPSG:4326'</span><span> </span><span>:</span><span> </span><span>true</span><span>}</span><span>
</span><span>});</span><span>
</span><span>var</span><span> treeConfig </span><span>=</span><span> </span><span>[</span><span>
</span><span>{</span><span>
nodeType</span><span>:</span><span> </span><span>"gx_layer"</span><span>,</span><span>
layer</span><span>:</span><span> bpn</span><span>,</span><span>
isLeaf</span><span>:</span><span> </span><span>false</span><span>,</span><span>
loader</span><span>:</span><span> </span><span>{</span><span>
param</span><span>:</span><span> </span><span>"LAYERS"</span><span>,</span><span>
</span><span>},</span><span>
expanded</span><span>:</span><span> </span><span>false</span><span>
</span><span>}];</span><span>
tree </span><span>=</span><span> </span><span>new</span><span> </span><span>Ext</span><span>.</span><span>tree</span><span>.</span><span>TreePanel</span><span>({</span><span>
border</span><span>:</span><span> </span><span>true</span><span>,</span><span>
region</span><span>:</span><span> </span><span>"west"</span><span>,</span><span>
title</span><span>:</span><span> </span><span>"Entre Ríos"</span><span>,</span><span>
width</span><span>:</span><span> </span><span>250</span><span>,</span><span>
split</span><span>:</span><span> </span><span>true</span><span>,</span><span>
collapsible</span><span>:</span><span> </span><span>true</span><span>,</span><span>
collapseMode</span><span>:</span><span> </span><span>"mini"</span><span>,</span><span>
autoScroll</span><span>:</span><span> </span><span>true</span><span>,</span><span>
loader</span><span>:</span><span> </span><span>new</span><span> </span><span>Ext</span><span>.</span><span>tree</span><span>.</span><span>TreeLoader</span><span>({</span><span>
applyLoader</span><span>:</span><span> </span><span>true</span><span>,</span><span>
uiProviders</span><span>:</span><span> </span><span>{</span><span>
</span><span>"layernodeui"</span><span>:</span><span> </span><span>LayerNodeUI</span><span>
</span><span>}</span><span>
</span><span>}),</span><span>
root</span><span>:</span><span> </span><span>{</span><span>
nodeType</span><span>:</span><span> </span><span>"async"</span><span>,</span><span>
children</span><span>:</span><span> treeConfig
</span><span>},</span><span>
rootVisible</span><span>:</span><span> </span><span>false</span><span>,</span><span>
lines</span><span>:</span><span> </span><span>false</span><span>,</span><span>
</span><span>});<br><br></span></code><span style="font-family:times new roman,serif"><font>
</font></span></pre></div></div></td></tr></tbody></table><font><span style="font-family:arial,helvetica,sans-serif"><br clear="all"></span></font><pre><span style="font-family:times new roman,serif"><font><span style="font-family:arial,helvetica,sans-serif"><font>Each layer (node)<code> 'Año 2004', 'Año 2005', 'Año 2006', 'Año 2007', 'Año 2009'</code> has a different image. What should I change in <code>treeConfig</code>? </font><br>
</span></font></span></pre>Regards,<br clear="all"><div><div><br>-- <br>Cristhian A. Boujon.<br><img src="http://img812.imageshack.us/img812/4905/unledhqb.png"><br>
</div></div></div>