<?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 what if I need to get some information from widget.html? in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817571#M7099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a simple widget using my own code and want to run in WAB developer Edition.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In Widget.html file&lt;/STRONG&gt;, I have a dijit/form/Select as the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;select class="ControlA"&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data-dojo-attach-point="myfirstControl"&lt;/P&gt;&lt;P&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; data-dojo-type="dijit/form/Select"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/select&amp;gt;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&lt;STRONG&gt;In Widget.js file&lt;/STRONG&gt;, I have add some values to the 'Select'; I want to get the current displayed value using the code as the following:&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&lt;STRONG&gt;alert("The current selected value is &amp;nbsp;"+ this. myfirstControl.displayedValue);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;But the system always indicated that it is not defined. So what if I need to get some information from my dijit/form/Select? What should I do? Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 May 2017 18:42:45 GMT</pubDate>
    <dc:creator>LindaM</dc:creator>
    <dc:date>2017-05-03T18:42:45Z</dc:date>
    <item>
      <title>what if I need to get some information from widget.html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817571#M7099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a simple widget using my own code and want to run in WAB developer Edition.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In Widget.html file&lt;/STRONG&gt;, I have a dijit/form/Select as the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;select class="ControlA"&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data-dojo-attach-point="myfirstControl"&lt;/P&gt;&lt;P&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; data-dojo-type="dijit/form/Select"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/select&amp;gt;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&lt;STRONG&gt;In Widget.js file&lt;/STRONG&gt;, I have add some values to the 'Select'; I want to get the current displayed value using the code as the following:&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&lt;STRONG&gt;alert("The current selected value is &amp;nbsp;"+ this. myfirstControl.displayedValue);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;&lt;/P&gt;&lt;P style="text-indent: 12.0pt;"&gt;But the system always indicated that it is not defined. So what if I need to get some information from my dijit/form/Select? What should I do? Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 18:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817571#M7099</guid>
      <dc:creator>LindaM</dc:creator>
      <dc:date>2017-05-03T18:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: what if I need to get some information from widget.html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817572#M7100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;In your Widget.js file did you include _WidgetsInTemplateMixin?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;define&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;'dojo/_base/declare'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;'dijit/_WidgetsInTemplateMixin'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; declare&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; _WidgetsInTemplateMixin&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;declare&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;BaseWidget&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; _WidgetsInTemplateMixin&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:40:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817572#M7100</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T09:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: what if I need to get some information from widget.html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817573#M7101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I did. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 20:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817573#M7101</guid>
      <dc:creator>LindaM</dc:creator>
      <dc:date>2017-05-03T20:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: what if I need to get some information from widget.html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817574#M7102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Linda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Then&amp;nbsp;your function that needs to access this.myfirstControl is out of scope then and you need to use lang.hitch. Can you share the whole function that is accessing&amp;nbsp;&lt;SPAN&gt;this.myfirstControl?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 20:21:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/what-if-i-need-to-get-some-information-from-widget/m-p/817574#M7102</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-05-03T20:21:09Z</dc:date>
    </item>
  </channel>
</rss>

