|
POST
|
Am I correct in understanding that the AddData Widget that is included with WAB Developer v2.6 does NOT allow for kml/kmz files? I don't see that option in my installation. It is available option on the hosted WAB Developer, but I want to make sure that what I see in my WABDev2.6 install.
... View more
02-02-2018
06:12 AM
|
0
|
11
|
3638
|
|
POST
|
Thank you! ...again. This saves me from dealing with %scratchworkspace% / in_memory workspace mess dealing with intermediate data -- it gets messy when that stuff happens as a gp service. It also removes a bunch of convoluted complexity that is just not needed.
... View more
01-30-2018
02:00 PM
|
0
|
1
|
3504
|
|
POST
|
Thanks Randy, I'm a little concerned about relying upon maxOID, only because ultimately this will be published as a GP service and I want to be sure I'm only working with the specific geometry per request. I hacked together an approach that simply writes the feature to an in_memory FC, run an update cursor on that, then use it to perform the final insert on the destination FC.
... View more
01-30-2018
11:30 AM
|
0
|
3
|
3504
|
|
POST
|
Using arcpy.da.InsertCursor, what is the best way to capture the ObjectId value of the row that was just inserted? with arcpy.da.SearchCursor(finalFC, fieldnames, 'OBJECTID = {}'.format(oid)) as fscur:
for fsrow in fscur:
with arcpy.da.InsertCursor(scratchFC, fieldnames) as icur:
icur.insertRow(fsrow)
#I need to capture the OBJECTID value of the row that was just inserted in the line above
del icur
... View more
01-30-2018
09:06 AM
|
1
|
5
|
4408
|
|
POST
|
Just a simple/quick discussion post that I think might help others that are likely in a similar situation: as our team deploys more and more WAB products to our organization, we've found that there's an uptick in requests/requirements that are above/beyond what a typical WAB product can deliver. This of course just means we end up needing a custom widget. We have a couple of custom widgets deployed here but not much complexity went into them or they had been developed from outside our group, so we didn't really have that required knowledge base to take on a new widget dev implementation. THIS post is what started our dev work, and Robert's solution is invaluable to get that simplified widget. We initially thought, "hey, let's just use an existing widget like the GP widget to get our tabbed requirement met". What happens is the complexity of the widget makes it difficult to break down into logical segments for newbs like us. Also, THIS post details some of the problems and resolutions of that initial implementation. A big thank you Robert Scheitlin for taking the time to provide the guidance --- absolutely needed it!
... View more
01-25-2018
09:12 AM
|
2
|
0
|
572
|
|
POST
|
They do not have an appropriate emoji for me to use. I'll get this tested out in the a.m. -- I appreciate you taking a look!
... View more
01-24-2018
03:28 PM
|
0
|
0
|
2394
|
|
POST
|
Robert -- unable to email as .zip due to our security policies. Trying to attach here with a simplified version (that probably generated more errors because I've missed a squiglie or something).
... View more
01-24-2018
01:41 PM
|
0
|
2
|
2394
|
|
POST
|
Your vCard on your profile page didn't contain an email. Not sure if you read the messenger msgs here but sent you a note.
... View more
01-24-2018
11:26 AM
|
0
|
0
|
2394
|
|
POST
|
Agreed, there's only a couple of references to that function so I can eliminate it. I'm back to the original uncaught TypeError: this.appNoInput.get is not a function _onQueryAppNo: function() {
// summary:
// When an application is queried via the widget,
// this function begins look up tasks.
this.resetForm();
var appNo = this.appNoInput.get("value"); //error occurs here
console.log('_onQueryAppNo value: ', appNo);
var query = new Query();
query.where = "APP_NO = '" + appNo + "'";
query.outFields = ["*"];
this.queryTask.execute(query).then(lang.hitch(this, this._populateForm));
},
... View more
01-24-2018
11:06 AM
|
0
|
6
|
2394
|
|
POST
|
Just reducing it down to the couple of functions I'm having issues with... _onSearchKeyPress: function(evt){
// summary:
// If the enter key is pressed, query for the app id.
if (evt.charOrCode === keys.ENTER){
lang.hitch(this, this._onQueryAppNo());
}
},
_onQueryAppNo: function() {
// summary:
// When an application is queried via the widget,
// this function begins look up tasks.
this.resetForm();
//var appNo = this._getAppNo();
var appNo = lang.hitch(this, this._getAppNo());
console.log('_onQueryAppNo value: ', appNo);
var query = new Query();
query.where = "APP_NO = '" + appNo + "'";
query.outFields = ["*"];
this.queryTask.execute(query).then(lang.hitch(this, this._populateForm));
},
_getAppNo: function() {
// summary:
// Parse the current form application number.
//this.appNoDiv.innerHTML = this.currentFeature.APP_NO
return this.appNoInput.get("value").trim();
}, When looking at console.log('_onQueryAppNo value: ', appNo); it basically prints out the entire html for that control -- this is what shows in the dev tools log: For the line in the widget.js
console.log('_onQueryAppNo value: ', appNo);
This is the log prints in Chrome dev tools console:
<input type="text" class="appN<input type="text" class="appNoBox" id="widgets_blah_Widget_36_appNoInput" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-attach-point="appNoInput" data-dojo-attach-event="keypress:_onSearchKeyPress">oBox" id="widgets_RegExhibits_Widget_36_appNoInput" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-attach-point="appNoInput" data-dojo-attach-event="keypress:_onSearchKeyPress">
... View more
01-24-2018
10:43 AM
|
0
|
8
|
4750
|
|
POST
|
_onQueryAppNo: function() {
// summary:
// When an application is queried via the widget,
// this function begins look up tasks.
this.resetForm();
var appNo = this.appNoInput.get("value"); //error occurs here
console.log("appNo: ", appNo)
var query = new Query();
query.where = "APP_NO = '" + appNo + "'";
query.outFields = ["*"];
this.queryTask.execute(query).then(lang.hitch(this, this._populateForm));
},
... View more
01-24-2018
08:38 AM
|
0
|
12
|
4750
|
|
POST
|
I'll try to reduce things down to bare minimum at some point -- initially I've attempted to plop in an existing working widget onto the tab solution you've helped with yesterday. Here's more code from the implementation: return declare([_WidgetsInTemplateMixin, BaseWidget], {
baseClass: "jimu-widget-customwidget",
startup: function() {
// summary:
// Called on initial widget load
// This function sets all of our configurable variables to those set in the settings
// page/file.
window.map = this.map;
window.widget = this;
this.inherited(arguments);
this.geoLayerUrl = this.config.geoLayerUrl;
},
postCreate: function() {
this._initTabContainer();
},
_initTabContainer: function() {
var tabs = [];
tabs.push({
title: 'Tab 1',
content: this.tabNode1
});
tabs.push({
title: 'Tab2',
content: this.tabNode2
});
this.selTab = 'Tab 1';
this.tabContainer = new TabContainer({
tabs: tabs,
selected: this.selTab
}, this.tabIdentify);
this.tabContainer.startup();
this.own(on(this.tabContainer, 'tabChanged', lang.hitch(this, function(title) {
if (title !== 'Tab 1') {
//do something now that Tab 2 has been selected
}
})));
utils.setVerticalCenter(this.tabContainer.domNode);
},
onReceiveData: function(name, widgetId, data /*,historyData*/) {
this.appNoInput.set("value", data.item.title);
},
_onSearchKeyPress: function(evt){
// summary:
// If the enter key is pressed, query for the app id.
if (evt.charOrCode === keys.ENTER){
this._onQueryAppNo();
}
},
_onQueryAppNo: function() {
// summary:
// When an application is queried via the widget,
// this function begins look up tasks.
this.resetForm();
var appNo = this.appNoInput.get("value"); //error occurs here
console.log("appNo: ", appNo)
var query = new Query();
query.where = "APP_NO = '" + appNo + "'";
query.outFields = ["*"];
this.queryTask.execute(query).then(lang.hitch(this, this._populateForm));
},
... View more
01-24-2018
08:35 AM
|
0
|
0
|
2394
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2020 10:47 AM | |
| 1 | 10-25-2022 11:46 AM | |
| 1 | 08-08-2022 01:40 PM | |
| 1 | 02-15-2019 08:21 AM | |
| 2 | 08-14-2023 07:14 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-22-2025
02:28 PM
|