<?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 Re: Going from ArcGIS API for JS to WAB in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853440#M11103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first thing to make sure the modules you're calling in "define" are in the same order as the arguments you're assigning them in "function". They are all messed up in your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jan 2018 15:35:43 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2018-01-17T15:35:43Z</dc:date>
    <item>
      <title>Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853435#M11098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys, I was wondering if there is any documentation available (if it is even possible) about converting a webmap from the javascript api into a widget/webmap on the web app builder.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example I am attempting to create an application where the user can edit features without a popup of any sort appearing. I understand that there is a code sample that does exactly that and i have linked it below. But I am using agol and do not host anything on my own servers, so i need this functionality in the form of a widget.&lt;/P&gt;&lt;P&gt;Linked js example :&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/ed_feature_creation.html" title="https://developers.arcgis.com/javascript/3/jssamples/ed_feature_creation.html"&gt;Edit without editor widget | ArcGIS API for JavaScript 3.23&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 16:38:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853435#M11098</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-11T16:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853436#M11099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try To search in this SDK&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/web-appbuilder/guide/get-started.htm" title="https://developers.arcgis.com/web-appbuilder/guide/get-started.htm"&gt;Get started—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; and in my opinion just delete all the creation of the web map in the widget and use the expretion "this.map", look this example from Route Example:&lt;/P&gt;&lt;P&gt;define([&lt;BR /&gt;'dojo/_base/declare', &lt;BR /&gt;'jimu/BaseWidget',&lt;BR /&gt;&lt;SPAN&gt;'jimu/loaderplugins/jquery-loader!&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fcode.jquery.com%2Fjquery-git1.min.js" rel="nofollow" target="_blank"&gt;https://code.jquery.com/jquery-git1.min.js&lt;/A&gt;&lt;SPAN&gt;',&lt;/SPAN&gt;&lt;BR /&gt;"dojo/dom",&lt;BR /&gt;"dojo/_base/array",&lt;BR /&gt;"esri/urlUtils",&lt;BR /&gt;"esri/map",&lt;BR /&gt;"esri/graphic", &lt;BR /&gt;"esri/tasks/RouteTask", &lt;BR /&gt;"esri/tasks/RouteParameters",&lt;BR /&gt;"esri/tasks/FeatureSet", &lt;BR /&gt;"esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt;"esri/symbols/SimpleLineSymbol", &lt;BR /&gt;"dojo/on",&lt;BR /&gt;"dijit/registry",&lt;BR /&gt;"dijit/layout/ContentPane",&lt;BR /&gt;"dijit/form/HorizontalSlider",&lt;BR /&gt;"dijit/form/HorizontalRuleLabels",&lt;BR /&gt;"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"&lt;BR /&gt;],&lt;BR /&gt;function(declare, BaseWidget, $,dom,array,urlUtils, Map, Graphic, RouteTask, RouteParameters,&lt;BR /&gt; FeatureSet, SimpleMarkerSymbol, SimpleLineSymbol) {&lt;BR /&gt; //To create a widget, you need to derive from BaseWidget.&lt;BR /&gt; return declare([BaseWidget], {&lt;BR /&gt; // DemoWidget code goes here&lt;/P&gt;&lt;P&gt;//please note that this property is be set by the framework when widget is loaded.&lt;BR /&gt; //templateString: template,&lt;/P&gt;&lt;P&gt;baseClass: 'jimu-widget-demo',&lt;/P&gt;&lt;P&gt;postCreate: function() {&lt;BR /&gt; this.inherited(arguments);&lt;BR /&gt; console.log('postCreate');&lt;BR /&gt; },&lt;/P&gt;&lt;P&gt;startup: function() {&lt;BR /&gt; this.inherited(arguments);&lt;BR /&gt; console.log('startup');&lt;BR /&gt; //VARIABLES !!&lt;BR /&gt; var mapc,routeTask, routeParams,route;&lt;BR /&gt; var stopSymbol, routeSymbol, lastStop;&lt;BR /&gt; var map = this.map;&lt;BR /&gt; var mapc = this.map;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 16:56:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853436#M11099</guid>
      <dc:creator>Juan_ManuelAngel</dc:creator>
      <dc:date>2018-01-11T16:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853437#M11100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So in the widget just have actions and any reference I make to the map or layers of the map can be done using "this.map", and using my above example I should just start from the "function initEditing(evt) {" line and work my way down from there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 17:06:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853437#M11100</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-11T17:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853438#M11101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah thats right, and in the event call the map and try to define the modules from the basewidget.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 18:48:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853438#M11101</guid>
      <dc:creator>Juan_ManuelAngel</dc:creator>
      <dc:date>2018-01-11T18:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853439#M11102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after copying the code from&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jssamples/ed_feature_creation.html"&gt;This Code sample&lt;/A&gt;&amp;nbsp;and attempting to convert the code to Web App builder my widget refuses to load. I get a pop-up that says " Create widget error" and in the console i am getting "Error: uniqName_8 template:config.configText"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also do not see how I can add the html to widget.js. I have attached my widget.js code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define(['dojo/_base/declare',&lt;BR /&gt;'jimu/BaseWidget',"esri/map",&lt;BR /&gt;"esri/toolbars/draw",&lt;BR /&gt;"esri/toolbars/edit",&lt;BR /&gt;"esri/graphic",&lt;BR /&gt;"esri/config",&lt;BR /&gt;"esri/layers/FeatureLayer",&lt;BR /&gt;"esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt;"esri/symbols/SimpleLineSymbol",&lt;BR /&gt;"esri/symbols/SimpleFillSymbol",&lt;BR /&gt;"esri/dijit/editing/TemplatePicker",&lt;BR /&gt;"dojo/_base/array",&lt;BR /&gt;"dojo/_base/lang",&lt;BR /&gt;"dojo/parser",&lt;BR /&gt;"dijit/registry",&lt;BR /&gt;"dijit/layout/BorderContainer",&lt;BR /&gt;"dijit/layout/ContentPane",&lt;BR /&gt;"dijit/form/Button",&lt;BR /&gt;"dojo/domReady!"],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function(declare, BaseWidget, map, draw, edit, graphic, config,FeatureLayer, SimpleMarkerSymbol,SimpleLineSymbol,SimpleFillSymbol,&lt;BR /&gt;TemplatePicker,array,lang,parser,registry,BorderContainer,ContentPane,Button,domReady) {&lt;BR /&gt; //To create a widget, you need to derive from BaseWidget.&lt;BR /&gt; return declare([BaseWidget], {&lt;BR /&gt; // DemoWidget code goes here&lt;/P&gt;&lt;P&gt;//please note that this property is be set by the framework when widget is loaded.&lt;BR /&gt; //templateString: template,&lt;/P&gt;&lt;P&gt;baseClass: 'jimu-widget-ROP',&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; postCreate: function() {&lt;BR /&gt; this.inherited(arguments);&lt;BR /&gt; console.log('postCreate');&lt;BR /&gt; },&lt;/P&gt;&lt;P&gt;startup: function() {&lt;BR /&gt; this.inherited(arguments);&lt;BR /&gt; this.mapIdNode.innerHTML = 'map id:' + this.map.id;&lt;BR /&gt; require(["jimu/LayerNode"], function(LayerNode) { /* code goes here */ });&lt;BR /&gt; var map = this.map;&lt;BR /&gt; console.log('startup');&lt;/P&gt;&lt;P&gt;},&lt;BR /&gt; _initEditing: function(evt){&lt;BR /&gt; console.log("InitEditing",evt);&lt;BR /&gt; var currentLayer = null;&lt;BR /&gt; var layers = arrayUtils.map(evt.layers, function(result){&lt;BR /&gt; return result.layer;&lt;BR /&gt; });&lt;BR /&gt; console.log("layers", layers);&lt;BR /&gt; var editToolbar = new Edit(this.map);&lt;BR /&gt; editToolbar.on("deactivate", function(evt){&lt;BR /&gt; currentLayer.applyEdits(null,[evt.graphic], null);&lt;BR /&gt; });&lt;BR /&gt; arrayUtils.forEach(layers,function(layer){&lt;BR /&gt; var editingEnabled = false;&lt;BR /&gt; layer.on("dbl-click",function(evt){&lt;BR /&gt; event.stop(evt);&lt;BR /&gt; if (editingEnabled == false){&lt;BR /&gt; editingEnabled = true;&lt;BR /&gt; editToolbar.activate(Edit.EDIT_VERTICES , evt.graphic);&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt; currentLayer = this;&lt;BR /&gt; editToolbar.deactivate();&lt;BR /&gt; editingEnabled = false;&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var templatePicker = new TemplatePicker({&lt;BR /&gt; FeatureLayer: layers,&lt;BR /&gt; rows: "auto",&lt;BR /&gt; columns: 2,&lt;BR /&gt; grouping: true,&lt;BR /&gt; style: "height: auto; overflow: auto;"&lt;BR /&gt; }, "templatePickerDiv");&lt;BR /&gt; templatePicker.startup();&lt;BR /&gt; var drawtoolbar = new Draw(this.map);&lt;/P&gt;&lt;P&gt;var selectedTemplate;&lt;BR /&gt; templatePicker.on ("Selection-Change", function(){&lt;BR /&gt; if (templatePicker.getSelected()){&lt;BR /&gt; selectedTemplate = templatePicker.getSelected();&lt;BR /&gt; }&lt;BR /&gt; switch (selectedTemplate.featureLayer.geometryType) {&lt;BR /&gt; case "esriGeometryPoint":&lt;BR /&gt; drawToolbar.activate(Draw.POINT);&lt;BR /&gt; break;&lt;BR /&gt; case "esriGeometryPolyline":&lt;BR /&gt; drawToolbar.activate(Draw.POLYLINE);&lt;BR /&gt; break;&lt;BR /&gt; case "esriGeometryPolygon":&lt;BR /&gt; drawToolbar.activate(Draw.POLYGON);&lt;BR /&gt; break;&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; drawToolbar.on("draw-end", function(evt){&lt;BR /&gt; drawToolbar.deactivate();&lt;BR /&gt; editToolbar.deactivate();&lt;BR /&gt; var newAttributes = lang.mixin({}, selectedTemplate.template&lt;BR /&gt; .prototype.attributes);&lt;BR /&gt; var newGraphic = new Graphic(evt.geometry, null, newAttributes);&lt;BR /&gt; selectedTemplate.featureLayer.applyEdits([newGraphic],null,null);&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853439#M11102</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-17T14:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853440#M11103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first thing to make sure the modules you're calling in "define" are in the same order as the arguments you're assigning them in "function". They are all messed up in your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:35:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853440#M11103</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2018-01-17T15:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853441#M11104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well that's embarrassing, I went ahead and changed it and am still getting the same error message after refreshing the page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:42:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853441#M11104</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-17T15:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853442#M11105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain what widget do you want to create ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853442#M11105</guid>
      <dc:creator>Juan_ManuelAngel</dc:creator>
      <dc:date>2018-01-18T15:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853443#M11106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For now I just want to re-create&amp;nbsp;&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/3/jssamples/ed_feature_creation.html"&gt;this sample&lt;/A&gt;&amp;nbsp;(but using my layer) so i can learn how to properly develop in WAB. I have fixed the errors I mentioned above but am now getting a reference error. in the startup command." ReferenceError: initEditing is not defined"&amp;nbsp; Ill post my code below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define(['dojo/_base/declare',&lt;BR /&gt;'jimu/BaseWidget',"esri/map",&lt;BR /&gt;"esri/toolbars/draw",&lt;BR /&gt;"esri/toolbars/edit",&lt;BR /&gt;"esri/graphic",&lt;BR /&gt;"esri/config",&lt;BR /&gt;"esri/layers/FeatureLayer",&lt;BR /&gt;"esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt;"esri/symbols/SimpleLineSymbol",&lt;BR /&gt;"esri/symbols/SimpleFillSymbol",&lt;BR /&gt;"esri/dijit/editing/TemplatePicker",&lt;BR /&gt;"dojo/_base/array",&lt;BR /&gt;"dojo/_base/lang",&lt;BR /&gt;"dojo/parser",&lt;BR /&gt;"dijit/registry",&lt;BR /&gt;"dijit/layout/BorderContainer",&lt;BR /&gt;"dijit/layout/ContentPane",&lt;BR /&gt;"dijit/form/Button",&lt;BR /&gt;"dojo/domReady!"],&lt;/P&gt;&lt;P&gt;function(declare, BaseWidget, map, draw, edit, graphic, esriConfig, FeatureLayer, SimpleMarkerSymbol,SimpleLineSymbol,SimpleFillSymbol,&lt;BR /&gt;TemplatePicker, arrayUtils, lang, parser, registry, BorderContainer, ContentPane, button, dom) {&lt;BR /&gt; parser.parse();&lt;BR /&gt; //To create a widget, you need to derive from BaseWidget.&lt;BR /&gt; return declare([BaseWidget], {&lt;BR /&gt; // DemoWidget code goes here&lt;/P&gt;&lt;P&gt;//please note that this property is be set by the framework when widget is loaded.&lt;BR /&gt; //templateString: template,&lt;BR /&gt; baseClass: 'jimu-widget-ROP',&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; postCreate: function() {&lt;BR /&gt; this.inherited(arguments);&lt;BR /&gt; console.log('postCreate');&lt;BR /&gt; },&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; startup: function() {&lt;BR /&gt; this.inherited(arguments);&lt;BR /&gt; this.mapIdNode.innerHTML = 'map id:' + this.map.id;&lt;BR /&gt; require(["jimu/LayerNode"], function(LayerNode) { /* code goes here */ });&lt;BR /&gt; var map = this.map;&lt;BR /&gt; console.log('startup');&lt;BR /&gt; this.map.on("layers=add-result", initEditing);&lt;/P&gt;&lt;P&gt;},&lt;BR /&gt; initEditing: function() {&lt;BR /&gt; console.log("initEditing",evt);&lt;BR /&gt; var currentLayer = null;&lt;BR /&gt; var layers = arrayUtils.map(evt.layers, function(result){&lt;BR /&gt; return result.layer;&lt;BR /&gt; });&lt;BR /&gt; console.log("layers", layers);&lt;BR /&gt; var editToolbar = new Edit(this.map);&lt;BR /&gt; editToolbar.on("deactivate", function(evt){&lt;BR /&gt; currentLayer.applyEdits(null,[evt.graphic], null);&lt;BR /&gt; });&lt;BR /&gt; arrayUtils.forEach(layers,function(layer){&lt;BR /&gt; var editingEnabled = false;&lt;BR /&gt; layer.on("dbl-click",function(evt){&lt;BR /&gt; event.stop(evt);&lt;BR /&gt; if (editingEnabled == false){&lt;BR /&gt; editingEnabled = true;&lt;BR /&gt; editToolbar.activate(Edit.EDIT_VERTICES , evt.graphic);&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt; currentLayer = this;&lt;BR /&gt; editToolbar.deactivate();&lt;BR /&gt; editingEnabled = false;&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var templatePicker = new TemplatePicker({&lt;BR /&gt; FeatureLayer: layers,&lt;BR /&gt; rows: "auto",&lt;BR /&gt; columns: 2,&lt;BR /&gt; grouping: true,&lt;BR /&gt; style: "height: auto; overflow: auto;"&lt;BR /&gt; }, "templatePickerDiv");&lt;BR /&gt; templatePicker.startup();&lt;BR /&gt; var drawtoolbar = new Draw(this.map);&lt;/P&gt;&lt;P&gt;var selectedTemplate;&lt;BR /&gt; templatePicker.on ("Selection-Change", function(){&lt;BR /&gt; if (templatePicker.getSelected()){&lt;BR /&gt; selectedTemplate = templatePicker.getSelected();&lt;BR /&gt; }&lt;BR /&gt; switch (selectedTemplate.featureLayer.geometryType) {&lt;BR /&gt; case "esriGeometryPoint":&lt;BR /&gt; drawToolbar.activate(Draw.POINT);&lt;BR /&gt; break;&lt;BR /&gt; case "esriGeometryPolyline":&lt;BR /&gt; drawToolbar.activate(Draw.POLYLINE);&lt;BR /&gt; break;&lt;BR /&gt; case "esriGeometryPolygon":&lt;BR /&gt; drawToolbar.activate(Draw.POLYGON);&lt;BR /&gt; break;&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; drawToolbar.on("draw-end", function(evt){&lt;BR /&gt; drawToolbar.deactivate();&lt;BR /&gt; editToolbar.deactivate();&lt;BR /&gt; var newAttributes = lang.mixin({}, selectedTemplate.template&lt;BR /&gt; .prototype.attributes);&lt;BR /&gt; var newGraphic = new Graphic(evt.geometry, null, newAttributes);&lt;BR /&gt; selectedTemplate.featureLayer.applyEdits([newGraphic],null,null);&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:10:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853443#M11106</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-18T15:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853444#M11107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm seeing a typo here:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"layers=add-result"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; initEditing&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;that should be&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"layers-add-result"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; initEditing&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, this line won't work properly, since the events are case-sensitive&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;templatePicker&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;on &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Selection-Change"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&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="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be helpful if you used &lt;A _jive_internal="true" href="https://community.esri.com/docs/DOC-8691-posting-code-with-syntax-highlighting-on-geonet"&gt;Syntax Highlighting&lt;/A&gt; when posting code, since that would let us point to specific line numbers and make it easier to read&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:32:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853444#M11107</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2018-01-18T15:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853445#M11108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made those changes but the error message still shows up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 15:40:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853445#M11108</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-18T15:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853446#M11109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ab i get this solution.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/393196_pastedImage_1.png" style="width: 620px; height: 348px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what you want ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firts You need to develope the Widget folder, its look like this, then you need to create your html and your java script code. i am going to attach the code of the widget, you know how to add the widget to the web app builder widget pool?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:39:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853446#M11109</guid>
      <dc:creator>Juan_ManuelAngel</dc:creator>
      <dc:date>2018-01-18T16:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853447#M11110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, I will download and compare the code with my own code and see where I made my mistakes. I assume using my own layer (which is hosted on arcgis online) will not be too difficult.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:43:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853447#M11110</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-18T16:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853448#M11111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah just use the Web Map in your web app builder and thewidget get the layers to delete the custom layers just delete this lines.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="393219" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/393219_pastedImage_1.png" style="width: 620px; height: 348px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this help to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:46:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853448#M11111</guid>
      <dc:creator>Juan_ManuelAngel</dc:creator>
      <dc:date>2018-01-18T16:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853449#M11112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I see where my problem is, i defined my functions outside of the startup method whereas you placed everything inside of the startup method. But i tried defining the function as _initEditing and without the underscore (which i believe is what would make into a global function) and I still get the same error. Do you think it is not as simple as that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 16:59:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853449#M11112</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-18T16:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Going from ArcGIS API for JS to WAB</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853450#M11113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just realized that the widget will only populate the layers that you add to it in the .js file. I thought that if this.map is called it retrieves all the information on the map including the layers.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 17:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/going-from-arcgis-api-for-js-to-wab/m-p/853450#M11113</guid>
      <dc:creator>AbhinavSharma</dc:creator>
      <dc:date>2018-01-18T17:38:22Z</dc:date>
    </item>
  </channel>
</rss>

