When I have a featureAction in my widget, the onExecute method, when is executed?
I know that Is not when I open the widget, somebody knows when?
Rolando,
You have to build one yourself. You can look at the eSearch widget for an example of this.
Widget.html:
<SPAN class="operator token"><</SPAN>div <SPAN class="keyword token">class</SPAN><SPAN class="operator token">=</SPAN><SPAN class="string token">"popup-menu-button esearch-result-action-button"</SPAN> data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>attach<SPAN class="operator token">-</SPAN>event<SPAN class="operator token">=</SPAN><SPAN class="string token">"click:_onBtnMenuClicked"</SPAN> data<SPAN class="operator token">-</SPAN>dojo<SPAN class="operator token">-</SPAN>attach<SPAN class="operator token">-</SPAN>point<SPAN class="operator token">=</SPAN><SPAN class="string token">"divOptions"</SPAN> title<SPAN class="operator token">=</SPAN><SPAN class="string token">"${nls.resultactions}"</SPAN> style<SPAN class="operator token">=</SPAN><SPAN class="string token">"display:none;"</SPAN><SPAN class="operator token">></SPAN><SPAN class="operator token"><</SPAN><SPAN class="operator token">/</SPAN>div<SPAN class="operator token">></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
Widget.js:
_onBtnMenuClicked: function(evt){ var position = html.position(evt.target || evt.srcElement); var featureSet = this._getFeatureSet(); .....<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Robert, and how can I use a menu in the widget itself.?
When the custom FeatureAction is clicked. It depends if the FeatureAction is added to the popup menu or a menu in the widget itself.
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.