[Users] GeoExt LayerContainer with checkbox
Eric Lemoine
eric.lemoine at camptocamp.com
Wed Jun 9 07:28:54 CEST 2010
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
More information about the Users
mailing list