|
POST
|
Thanks for your suggestion, Robert. I tried that, but unfortunately it made no difference.
... View more
07-02-2015
01:54 PM
|
0
|
3
|
1770
|
|
POST
|
I have a border container that is not displaying its content panes correctly until I open the Developer Tools console. Can anyone see why that might be happening? I've inserted two screenshots showing before and after display states of the container. Markup: <div> <div data-dojo-attach-point="infoContainerDiv" id="infoContainerDiv"> </div> </div> Code in widget.js: this.infoContainer = new BorderContainer({ style: "height: 100%; width: 100%;" }); this.topContent = new ContentPane({ region: 'top', title: 'the title', content: 'I be on the top', style: 'height: 100px; border: 1px solid black;' }); this.bottomContent = new ContentPane({ region: 'bottom', title: 'the title', content: 'I be on the bottom', style: 'height: 100px; border: 1px solid black;' }); this.accordionContainer = new AccordionContainer({ region: 'center', style: 'border: 1px solid black;' }); this.accordionContainer.addChild( new ContentPane({ title: "This is a content pane", content: "Hi!" }) ); this.accordionContainer.addChild( new ContentPane({ title: "More content", content: "Hello" }) ); this.infoContainer.addChild(this.topContent); this.infoContainer.addChild(this.bottomContent); this.infoContainer.addChild(this.accordionContainer); this.infoContainer.placeAt(this.infoContainerDiv); this.infoContainer.startup(); Before: After:
... View more
07-01-2015
03:48 PM
|
0
|
5
|
4532
|
|
POST
|
I may be getting my terminology mixed up. I've just been learning about widgets that incorporate templates. I notice now that that the samplewidgets/demo has these lines in it: //please note that this property is be set by the framework when widget is loaded. templateString: template, Apparently I can get a template to load into the main widget using this in the define() 'dojo/text!./templates/TemplateName.html' and then inject this dependency into the widget.
... View more
06-24-2015
06:22 PM
|
1
|
0
|
1494
|
|
POST
|
Where is the best place to put other css files, such as bootstrap.css etc? How does one make the custom widget refer to these stylesheets? Putting them anywhere in the WAB folder and then doctoring the \client\stemapp\init.js by adding references in the resources object works, but feels like a hack. resources = resources.concat([ window.apiUrl + 'dojo/resources/dojo.css', window.apiUrl + 'dijit/themes/claro/claro.css', window.apiUrl + 'esri/css/esri.css', window.apiUrl + 'dojox/layout/resources/ResizeHandle.css', window.path + 'jimu.js/css/jimu.css', window.path + 'libs/jquery-2.1.1.min.js ]); Does anyone have a more elegant solution?
... View more
06-18-2015
07:09 PM
|
0
|
10
|
7181
|
|
POST
|
Hi Stan, I think that I was having problems with one of my widgets because I had an older version of WAB that didn't have a node.js that listened for folder changes. Does that make sense to you? Did the previous WAB not listen for folder changes?
... View more
06-18-2015
03:02 PM
|
0
|
1
|
971
|
|
POST
|
When its folder is copied to client\stemapp\widgets the eSearch widget automatically appears in the Choose Widget widget pool dialog without having to add a reference in list.json or config.json. How does that happen? And why don't other widgets behave like that?
... View more
06-17-2015
07:26 PM
|
0
|
4
|
3964
|
|
POST
|
Can anyone suggest some possible causes for a 404 error when requesting http://[your host name:3344]/webapp/?config=config.json ?
... View more
06-10-2015
09:28 PM
|
0
|
3
|
4106
|
|
POST
|
Hi Robert, I recently watched this video: ArcGIS Web AppBuilder: Development Tools and Techniques | Esri Video and have been implementing some of the tools and techniques that were suggested. The sub widget pattern is a Tom Wayson suggestion. His GITHub repository of the session is here: tomwayson/web-appbuilder-tools-techniques-dev-summit-2015 · GitHub. The sub widget pattern separates your custom widget code from the base widget implementation by embedding your sub widget in the base widget. Essentially you are using the base widget as a wrapper for your sub widget, which contains your business logic. Start the video at 8:06 to see the sub widget presentation. I recommend watching the entire video though.
... View more
06-09-2015
03:18 PM
|
1
|
1
|
1494
|
|
POST
|
I'm looking for an example of a widget that was developed using a sub widget pattern. Does anyone know where I could find one? Thanks.
... View more
06-09-2015
02:38 PM
|
0
|
5
|
4537
|
|
POST
|
I get this error in the console when I try to "Launch" my app. I found that an extra condition in the ConfigManager.js, where the error occurs, resolves this. Line 472: _processWebTier: function(appConfig){ var def = new Deferred(); var portalUrl = appConfig.portalUrl; if(appConfig.isWebTier){ //Although it is recommended to enable ssl for IWA/PKI portal by Esri, //there is no force on the client. They still can use http for IWA/PKI. //It is not correnct to assume web-tier authorization only works with https. tokenUtils.isWebTierPortal(portalUrl).then(lang.hitch(this, function(isWebTier) { var credential = tokenUtils.getPortalCredential(portalUrl); if(credential){ // condition added by alterwiel if(credential.ssl){ //if credential.ssl, it means that the protal is allSSL enabled if(window.location.protocol === 'http:' && !tokenUtils.isInConfigOrPreviewWindow()){ window.location.protocol = 'https:'; return; } } } def.resolve(isWebTier); }), lang.hitch(this, function(err) { def.reject(err); })); }else{ def.resolve(false); } return def; }
... View more
05-28-2015
05:08 PM
|
2
|
2
|
4596
|
|
POST
|
So if put my jQuery library reference in the resources array in \client\stemapp\init.js and put my libraries that depend on jQuery, like Bootstrap, in \client\stemapp\libs\store and add a reference to those libraries in the define of \client\stemapp\libs\main.js, will this force jQuery to load before Bootstrap?
... View more
05-21-2015
07:50 PM
|
0
|
0
|
4494
|
|
POST
|
Thanks, Jeremie. I've been trying to use the Dojo Bootstrap Typeahead since you made me aware of it. I've got it half working. I can get a list of items to show, but I can't figure out how to get the selected value when a list item is clicked. I've pasted in a code fragment below. I see that the 'change' event fires twice. The first time event.currentTarget.value is the string that was typed into the input. The second time it is the value that was selected from the drop down list. Another issue I have with the typeahead is that the process function only takes an array of strings. If pass it an array of objects like below, how do I get the address to display and, assuming that's possible, how do I get the parcelId when the item is selected: [{ "address":"10 Woodleigh Street", "locality":"Frankleigh Park", "parcelId":4648447 }] Here is the code that half works and displays an address when an array of strings is passed to process(), but fires the 'change' event twice when a list item is clicked. var q = dojo.query; q('#searchText').typeahead({ minLength: 5, source: function (query, process) { return xhr("http://localhost/SearchWebAPI/api/searchitem/1/?" + $.param(widget._searchLayers) + '&q=' + query, { handleAs: 'json', headers: { 'X-Requested-With': '' } }) .then(function (data) { var dataArray = []; for (var i = 0; i < data.length; i++) { if (data.address) { dataArray.push(data.address); } } process(dataArray); }); } }).on('change', function (event) { // fires twice var val = event.currentTarget.value; });
... View more
05-21-2015
07:24 PM
|
0
|
0
|
681
|
|
POST
|
When you say "suggested way", where did you find this suggestion? I've had trouble finding this documentation. I can only find this: Use other JavaScript libraries—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers.
... View more
05-20-2015
02:54 PM
|
0
|
4
|
4494
|
|
POST
|
Thanks, Tom. I tried your suggestion. Unfortunately when using this method the typeahead.jquery.min.js library is not loaded. I also tried loading both the JQuery and Typahead libraries using the Jimu loader. This didn't work either, so I've gone back to my nasty hack of index.html.
... View more
05-17-2015
03:00 PM
|
0
|
0
|
4494
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-27-2016 01:34 PM | |
| 1 | 05-13-2015 09:27 PM | |
| 1 | 06-09-2015 03:18 PM | |
| 1 | 06-24-2015 06:22 PM | |
| 1 | 07-07-2015 03:17 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-22-2021
03:45 PM
|