[Users] GeoExt LayerContainer with checkbox

Pierre Giraud pierre.giraud at camptocamp.com
Wed Jun 9 11:29:14 CEST 2010


Maybe this thread in the ExtJS forum will help.
http://www.extjs.com/forum/showthread.php?36179-TreePanel-Smart-Checkboxes

Pierre

On Wed, Jun 9, 2010 at 7:28 AM, Eric Lemoine
<eric.lemoine at camptocamp.com> wrote:
> On Tuesday, June 8, 2010, Julien-Samuel Lacroix <jlacroix at mapgears.com> wrote:
>> Hi,
>>
>> The problem of this code is that selecting all layers in the
>> LayerContainer doesn't select the parent checkbox. Any idea?
>
> Hi Julien
>
>
> I've never done this myself but can't you listen to "checkchange"
> events from the tree panel and do the following in the listener:
>
>  - if the node is a layer node, and if that node and its siblings are
> (un)checked, then (un)check the parent node
> - if the node has layer nodes as its children, check/uncheck these
> children nodes as appropriate
>
> You can possibly implement this in a plugin, whose "init" method will
> register the "checkchange" listener on the tree panel.
>
> Hope it helps,
>
> --
> Eric Lemoine
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel : 00 33 4 79 44 44 96
> Mail : eric.lemoine at camptocamp.com
> http://www.camptocamp.com
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>



-- 
Pierre GIRAUD
Géomaticien, Analyste

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

Tel : 00 33 4 79 44 44 93
Mail : pierre.giraud at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list