[Users] Change the name of sub layer under layer group

Christian Mayer mayer at terrestris.de
Wed Nov 2 07:57:45 CET 2011


Hi wangsom,

you can try to use a command like this (works for the given GeoExt
example):

tree.getRootNode().lastChild.childNodes[0].setText('TASMANIA ROADS');

in your real life application you probably have to find your wanted node
(here 'lastChild'). Therfore you can use the 'findChild' method [1] on
the root node.

Best regards,
Chris

[1]
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.tree.TreeNode-method-findChild
<http://docs.sencha.com/ext-js/3-4/#%21/api/Ext.tree.TreeNode-method-findChild>


--
BITTE BEACHTEN SIE UNSERE NEUE ADRESSE!

PÜTZCHENS CHAUSSEE 56
53227 BONN

Logo der terrestris GmbH & Co. KG

Dipl.-Ing. Christian Mayer
--- Anwendungsentwickler ---

terrestris GmbH & Co. KG
Pützchens Chaussee 56
53227 Bonn

Tel:   +49 (0)228 / 96 28 99 -53
Fax:   +49 (0)228 / 96 28 99 -57

Email: mayer at terrestris.de <mailto:mayer at terrestris.de>
Web:   http://www.terrestris.de

Amtsgericht Bonn, HRA 6835
Komplementärin: terrestris Verwaltungsgesellschaft mbH
vertreten durch: Hinrich Paulsen, Till Adams


Am 01.11.2011 20:32, schrieb Peerasak Wangsom:
> Dear All,
>
>
> The below link is the tree nodes example of GeoExt docs.
>
> http://api.geoext.org/1.0/examples/tree.html
>
> What can I do if I want to change the name of the sub layer under
> layer group.
> For example, if I want to change "topp:tasmania_roads" to "Tasmania
> Road", how do I edit javascript code.
>
> Thank you in advance,
>
> wangsom
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111102/14cd2891/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: terrestris-logo-150x150-color.png
Type: image/png
Size: 18800 bytes
Desc: not available
Url : http://www.geoext.org/pipermail/users/attachments/20111102/14cd2891/attachment-0001.png 


More information about the Users mailing list