<?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: Dojo/query and Webappbuilder layerlist widget (LayerListView.js) in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/dojo-query-and-webappbuilder-layerlist-widget/m-p/98640#M2933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Unless I am misinterpreting the code and your intent then what you are asking is not doable. You are asking for the proper code to query an attribute of a element that is yet to be created and added to the DOM.&amp;nbsp; I think this is what you are after:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var imageName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layerInfo.isTable) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'images/table.png';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (layerInfo.id === 'yourlayer'){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'images/yourLayer.png';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'images/noLegend.png';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:09:35 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-11T06:09:35Z</dc:date>
    <item>
      <title>Dojo/query and Webappbuilder layerlist widget (LayerListView.js)</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/dojo-query-and-webappbuilder-layerlist-widget/m-p/98639#M2932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to modify LayerListView.js of the webappbuilder layer list widget, so the image of the noLegend-image class will change based on the layer.&lt;/P&gt;&lt;P&gt;To accomplish this I tried adding the else-if to the dojo query below.&amp;nbsp; Based on the HTML/CSS in the attachment, how should the else-if be filled to populate the img class based on the tr class value.&amp;nbsp; Maybe this is the wrong approach but it seems the most obvious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dojo Query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var imageName:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (layerInfo.isTable){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'images/table.png';&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else if query () == 'yourLayer' {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'images/yourLayer.png';&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'imageName = 'images/noLegend.png';&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 17:46:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/dojo-query-and-webappbuilder-layerlist-widget/m-p/98639#M2932</guid>
      <dc:creator>TimJacobsen</dc:creator>
      <dc:date>2015-06-04T17:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dojo/query and Webappbuilder layerlist widget (LayerListView.js)</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/dojo-query-and-webappbuilder-layerlist-widget/m-p/98640#M2933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Unless I am misinterpreting the code and your intent then what you are asking is not doable. You are asking for the proper code to query an attribute of a element that is yet to be created and added to the DOM.&amp;nbsp; I think this is what you are after:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var imageName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layerInfo.isTable) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'images/table.png';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else if (layerInfo.id === 'yourlayer'){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'images/yourLayer.png';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageName = 'images/noLegend.png';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:09:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/dojo-query-and-webappbuilder-layerlist-widget/m-p/98640#M2933</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T06:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dojo/query and Webappbuilder layerlist widget (LayerListView.js)</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/dojo-query-and-webappbuilder-layerlist-widget/m-p/98641#M2934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was it, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 18:20:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/dojo-query-and-webappbuilder-layerlist-widget/m-p/98641#M2934</guid>
      <dc:creator>TimJacobsen</dc:creator>
      <dc:date>2015-06-04T18:20:12Z</dc:date>
    </item>
  </channel>
</rss>

