<?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: web app builder busy indicator client side function in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638787#M59637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure. The way to ensure that the loading shelter appears is call shelter.show() then add a setTimeout for 500 (half a second) and inside the setTimeout function call your actual code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Oct 2020 12:51:51 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2020-10-23T12:51:51Z</dc:date>
    <item>
      <title>web app builder busy indicator client side function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638784#M59634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am have extended web app builder and built a custom widget. I have a client side function that takes between 10 and 20 seconds to run. The function is client side and does not make a call to the server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to indicate to the user that the function is running when a user calls this function and also show when the function is finished. The function is called via a click event on a button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the&amp;nbsp;"dijit/ProgressBar" but this seems to work with requests made to the server but not client side functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Typically I use it as follows&lt;/P&gt;&lt;P&gt;html.setStyle("domNode", 'display', 'block');&lt;BR /&gt;&lt;SPAN&gt;"domNode"&lt;/SPAN&gt;.set('label','processing please wait...');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the function is finished&lt;/P&gt;&lt;P&gt;&amp;nbsp;html.setStyle(&lt;SPAN&gt;"domNode"&lt;/SPAN&gt;, 'display', 'none');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to such a work flow with client side functions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2020 17:04:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638784#M59634</guid>
      <dc:creator>wadsonmakari</dc:creator>
      <dc:date>2020-10-22T17:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: web app builder busy indicator client side function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638785#M59635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wadson,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;If you look at otb widget in WAB the way they handle this is to use "jimu/dijit/LoadingShelter" in the Widget.html and just call that object data-dojo-attach-point in the widget.js code like:&lt;/P&gt;&lt;DIV&gt;this.shelter.show(); and this.shelter.hide();&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2020 17:31:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638785#M59635</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-10-22T17:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: web app builder busy indicator client side function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638786#M59636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert for the suggestion. However it is not behaving in the way that I expected. I have implemented as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.shelter.show();&lt;/P&gt;&lt;P&gt;this.myFunction(); //this function takes between 10 - 20 seconds to run(doing client side analysis using esri geometry engine)&lt;/P&gt;&lt;P&gt;At the end of myFunction I have this.shelter.hide();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not see the Loading shelter at all. If I put an alert message after this.shelter.show(); I can see the loading shelter and it is hidden when the function finishes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I call myFunction via a click event on a button on my widget. Basically I would like the following workflow;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 User clicks button&lt;/P&gt;&lt;P&gt;2 widget tells user that processing has started and show shelter with message&lt;/P&gt;&lt;P&gt;3 hide shelter when processing is finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could this be due to the fact that Javascript is single threaded? Is there another way I can achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2020 12:08:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638786#M59636</guid>
      <dc:creator>wadsonmakari</dc:creator>
      <dc:date>2020-10-23T12:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: web app builder busy indicator client side function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638787#M59637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure. The way to ensure that the loading shelter appears is call shelter.show() then add a setTimeout for 500 (half a second) and inside the setTimeout function call your actual code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2020 12:51:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638787#M59637</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-10-23T12:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: web app builder busy indicator client side function</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638788#M59638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much that worked very well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2020 14:29:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/web-app-builder-busy-indicator-client-side/m-p/638788#M59638</guid>
      <dc:creator>wadsonmakari</dc:creator>
      <dc:date>2020-10-23T14:29:35Z</dc:date>
    </item>
  </channel>
</rss>

