Disable Generalize Features for Web Display in Add Data Widget

2352
15
Jump to solution
01-30-2019 11:07 AM
ChristinaBoggs-Chavira
New Contributor III

Hey folks, I'm looking to see if anyone has had success disabling the "generalize features for web display" functionality in the add data widget under the file tab. In general, this is great for rapid web display but specifically for our project we had it there so non-mappers could do QA/QC on some map stuff and they're seeing errors that aren't there because their file they upload is being generalized. At this moment we just have told folks but I'd like to remove this option for this application in particular. Thanks in advance! - Christina

Screenshot of web appbuilder built map application add data widget with the generalize features for web display toggled on

1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Add this css rule to the widgets style.css:

.generalize-options {
  display: none;
}

Make this edit to the widgets search\templates\AddFromFilePane.html (Line 6 set to false):

<div class="secondary-pane add-file-pane">

  <div class="generalize-options">
    <div data-dojo-type="jimu/dijit/CheckBox"
      data-dojo-attach-point="generalizeCheckBox"
      data-dojo-props="checked:false">
    </div>
  </div>
...

View solution in original post

15 Replies
RobertScheitlin__GISP
MVP Emeritus

Christina,

  There is no setting to disable that option but if you are using WAB Dev edition then I can provide the code changes to make that happen.

0 Kudos
ChristinaBoggs-Chavira
New Contributor III

That would be fantastic! Thank you!!!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Add this css rule to the widgets style.css:

.generalize-options {
  display: none;
}

Make this edit to the widgets search\templates\AddFromFilePane.html (Line 6 set to false):

<div class="secondary-pane add-file-pane">

  <div class="generalize-options">
    <div data-dojo-type="jimu/dijit/CheckBox"
      data-dojo-attach-point="generalizeCheckBox"
      data-dojo-props="checked:false">
    </div>
  </div>
...
ChristinaBoggs-Chavira
New Contributor III

Thank you!!!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

0 Kudos
ChristinaBoggs-Chavira
New Contributor III

Oh thanks!

0 Kudos
LukasWingert
New Contributor II

Is there a way to disable the checkbox out of another Widget? I have got a custom Widget that do some stuff at the beginning of a WebApp and it would be much easier to change this code only once instead of changing these lines in every single WebApp.

My code looks like this:

topic.subscribe('widgetCreated', function() {
    if(arguments[0].name === 'AddData') {
         // disable checkbox
    }
});

But how to get the checkbox and set checked to false?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lukas,

   You have to get a reference to the addData widget and then use:

To get the reference to the widget add WidgetManager to the widgets define array:

define([
...
    'jimu/WidgetManager',
...
],
  function(
...
    WidgetManager,
...

Then:

var _AddData = this.widgetManager.getWidgetsByName("AddData");‍
_AddData.generalizeCheckBox.checked = false;
0 Kudos
LukasWingert
New Contributor II

Hi Robert,

i get the following error:

0 Kudos