<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: TOC checkbox: automatically check parent when clicking sublayer in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601776#M13396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good suggestion,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it didn't work for me though &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Every group layer in my application is a map service. I guess that's the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks anyway!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Manolo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jul 2010 07:22:52 GMT</pubDate>
    <dc:creator>ManuelFrias</dc:creator>
    <dc:date>2010-07-28T07:22:52Z</dc:date>
    <item>
      <title>TOC checkbox: automatically check parent when clicking sublayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601774#M13394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Imagine all layers being off when opening the viewer. There are several parent layers containing sublayers. When someone selects a sublayer in TOC the parent layer does not get selected automatically. The user is therefore forced to click on both the sublayer AND the parent to view the layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this the default behavior of the sample viewer? Has anyone come up any way to solve it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tahnks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Manolo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 07:29:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601774#M13394</guid>
      <dc:creator>ManuelFrias</dc:creator>
      <dc:date>2010-04-13T07:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: TOC checkbox: automatically check parent when clicking sublayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601775#M13395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This works just for the immediate parent. If it is nested you would write a method and recursively set all parent's visble to true.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TocItemRenderer.as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private function onCheckBoxClick( event:MouseEvent ):void
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; event.stopPropagation();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (data is TocItem) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var item:TocItem = TocItem(data);
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; item.visible = _checkbox.selected;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(item.visible == true &amp;amp;&amp;amp; item.parent.visible == false)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item.parent.visible = true;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:40:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601775#M13395</guid>
      <dc:creator>JamesHolstead</dc:creator>
      <dc:date>2021-12-12T16:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: TOC checkbox: automatically check parent when clicking sublayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601776#M13396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good suggestion,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it didn't work for me though &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Every group layer in my application is a map service. I guess that's the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks anyway!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Manolo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jul 2010 07:22:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601776#M13396</guid>
      <dc:creator>ManuelFrias</dc:creator>
      <dc:date>2010-07-28T07:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: TOC checkbox: automatically check parent when clicking sublayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601777#M13397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Manolo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did a rewrite of the TOC classes to change the way they work with group layers. Currently when you turn on a group layer, it turns on all sub layers. This does not work for me as some of my group layers contain lots of sub layers. My code will turn on the parent of the group layer when a sub layer is turned on but in will not turn on the main map service. I am not sure how it will work if the group layers are services but you can give it a try. I had to make changes to all the classes in the TOCClasses folder. I suggest saving the original classes before trying this code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jul 2010 11:24:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601777#M13397</guid>
      <dc:creator>DavidGalluzzo</dc:creator>
      <dc:date>2010-07-28T11:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: TOC checkbox: automatically check parent when clicking sublayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601778#M13398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the attached classes, they have been very helpful!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Question:&amp;nbsp; what is the location of the compiled .as code? I would like to deploy this change to another server, and I don't know where the compiled version of the tocclasses is...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 19:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601778#M13398</guid>
      <dc:creator>AshleyOwens</dc:creator>
      <dc:date>2011-05-02T19:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: TOC checkbox: automatically check parent when clicking sublayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601779#M13399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi mfrias,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried using your TOC classes.. but i cant find CheckBoxIndeterminate and mapUtil...can you please tell the exact source so that I can refer to it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tanya&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 04:35:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601779#M13399</guid>
      <dc:creator>tanyabisen</dc:creator>
      <dc:date>2011-06-20T04:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: TOC checkbox: automatically check parent when clicking sublayer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601780#M13400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;is there any solution for that problem in the web appbuilder layer list widget?&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 04:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/toc-checkbox-automatically-check-parent-when/m-p/601780#M13400</guid>
      <dc:creator>btpbtp</dc:creator>
      <dc:date>2016-05-11T04:59:50Z</dc:date>
    </item>
  </channel>
</rss>

