On Wed, May 12, 2010 at 7:50 AM, Andreas Hocevar <[email protected]> wrote:
> Ext tree loaders are pretty extensible, and the loaders we have are no 
> exception.
>
> The most elegant way, as Eric already pointed out, is to store the href 
> somewhere, e.g. in the LayerStore. But there is no need to override a 
> constructor or render method. The loader's createNode method is the one 
> exposed to the API, and this is what you should override. See 
> http://www.extjs.com/deploy/dev/docs/?class=Ext.tree.TreeLoader and look for 
> the createNode method for an example.

Your solution is indeed better. Thanks Andreas.

One issue is that createNode receives a layer as opposed to a layer
record, so when overriding createNode one will need to find the layer
record corresponding to the layer. We could change the code so
createNode receives a layer record. We could also change LayerNode so
it can be configured with a layer record; currently the "layer" option
can reference a layer or a layer name, so we could extend this so it
can also reference a layer record.

Cheers,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to