Select to view content in your preferred language

Start in non edit mode

1412
6
Jump to solution
12-20-2016 05:18 PM
GregRieck
Regular Contributor

Hello,

Everytime my WAB site loads it starts in an active edit session. What I mean by that is if I were to select anything on the map it opens an attribute editor window. I would like to have it start up in a non edit mode by default. So that when I select an item on the map it opens the info window instead of an edit window. How do I go about making that happen?

Greg

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Greg,

  Sure the reason why the normal popup works after clicking the home button is that the widget deactivates and the onDeActivate method is called. so you can just make a call to the onDeActivate method after the widget is opened (line 20).

      onOpen: function() {
        this._init();
        LayerInfos.getInstance(this.map, this.map.itemInfo)
          .then(lang.hitch(this, function(operLayerInfos) {
            this._jimuLayerInfos = operLayerInfos;

            var timeoutValue;
            if(this.appConfig.theme.name === "BoxTheme") {
              timeoutValue = 1050;
              this.loading.show();
            } else {
              timeoutValue = 1;
            }
            setTimeout(lang.hitch(this, function() {
              if(!this.loading.hidden) {
                this.loading.hide();
              }
              this.widgetManager.activateWidget(this);
              this._createEditor();
              this.onDeActive();
            }), timeoutValue);
          }));
      },

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Emeritus

Greg,


  The only way I know that the app would start in editing mode is if you have the edit widget set to open at start. If you do not have it set to open at start then you should not have an issue.

GregRieck
Regular Contributor

Jewelry Box Theme, WAB 2.2

I do not see any options for setting the edit state on open to edit or not edit.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nope, Not really what I meant. If you have the edit widget set in the Jewelry Box themes drawer then it is opened at startup and thus the edit widget is activated and you are automatically in editing mode. If the edit widget is not in the Jewelry Box drawer and not set to open at start ("Open this widget automatically when the app starts"), then you will not have the issue.

0 Kudos
GregRieck
Regular Contributor

Yes, the edit widget is included and is present when the site opens. Is there a way to change the edit state when the site opens? I noticed clicking on HOME widget stops editing and allows me to open the info widget correctly. It's just a pain to always have to stop the edit session by clicking home when the site loads.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Greg,

  Sure the reason why the normal popup works after clicking the home button is that the widget deactivates and the onDeActivate method is called. so you can just make a call to the onDeActivate method after the widget is opened (line 20).

      onOpen: function() {
        this._init();
        LayerInfos.getInstance(this.map, this.map.itemInfo)
          .then(lang.hitch(this, function(operLayerInfos) {
            this._jimuLayerInfos = operLayerInfos;

            var timeoutValue;
            if(this.appConfig.theme.name === "BoxTheme") {
              timeoutValue = 1050;
              this.loading.show();
            } else {
              timeoutValue = 1;
            }
            setTimeout(lang.hitch(this, function() {
              if(!this.loading.hidden) {
                this.loading.hide();
              }
              this.widgetManager.activateWidget(this);
              this._createEditor();
              this.onDeActive();
            }), timeoutValue);
          }));
      },
GregRieck
Regular Contributor

Robert,

Thank You that worked.

Greg

0 Kudos