Select to view content in your preferred language

When the 'onExecute' method is executed?

1221
3
Jump to solution
10-18-2016 08:47 AM
RolandoFlorez
Occasional Contributor

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?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Rolando,

   You have to build one yourself. You can look at the eSearch widget for an example of this.

Widget.html:

<div class="popup-menu-button esearch-result-action-button" data-dojo-attach-event="click:_onBtnMenuClicked" data-dojo-attach-point="divOptions" title="${nls.resultactions}"
        style="display:none;"></div>

Widget.js:

  _onBtnMenuClicked: function(evt){
        var position = html.position(evt.target || evt.srcElement);
        var featureSet = this._getFeatureSet();

.....

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Rolando,

   When the custom FeatureAction is clicked. It depends if the FeatureAction is added to the popup menu or a menu in the widget itself.

0 Kudos
RolandoFlorez
Occasional Contributor

Robert, and how can I use  a menu in the widget itself.?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rolando,

   You have to build one yourself. You can look at the eSearch widget for an example of this.

Widget.html:

<div class="popup-menu-button esearch-result-action-button" data-dojo-attach-event="click:_onBtnMenuClicked" data-dojo-attach-point="divOptions" title="${nls.resultactions}"
        style="display:none;"></div>

Widget.js:

  _onBtnMenuClicked: function(evt){
        var position = html.position(evt.target || evt.srcElement);
        var featureSet = this._getFeatureSet();

.....