Hello! I am developing a custom widget that allows a user to select from existing polygon boundaries, add the selection to an on-premise dataset, and fill out the attribute fields of the newly created boundary. I am leveraging the smartEditor widget to accomplish the step where users fill out attribute fields related to their work boundary. Another geographer has suggested that the step to click the desired treatment boundary after it has been added to the dataset and after the smartEditor widget opens is confusing. Rather, it was suggested to open the smartEditor widget with this selected boundary pre-determined already so as to advance to the attribute field population step immediately once the widget opens. I am leveraging WAB v2.19 and the smartEditor widget that is included with this install. I can clearly see the function involved once a click event occurs on the selected boundary (_processRelationAndShowAttrInspector in Widget.js), but this function accepts a DOM click event (evt) to fire the function. Does anyone have a suggestion on how to pass in my loaded feature and geometry to the smartEditor widget onOpen? As it stands now, I'm just opening the widget with this.open("SmartEditor");. Is this even possible without a complete re-write? Is there an updated version that handles this?
Any help is certainly appreciated! I am relatively new to javascript 3.x and tend to revert back to my understanding of Python programming, which is very different! (@AlixVezina I think you wrote smartEditor and @RobertScheitlin__GISP I can tell you are fluent in javascript)
Hi @BrianDiunizio_GISP ,
Please would you be able to clarify all the steps your users are currently doing 1, 2 ,3... ? And also please the steps you would like to provide instead? Some screenshots may be helpful too.
Thank you!
Thank you for your reply!
Hi @BrianDiunizio_GISP thank you for the details!
We looked into this and, right now, the widget to widget communications on the Smart Editor's end only listens for selection messages from the Select widget and the Attribute Table widget (this was implemented starting with the Web AppBuilder developer edition 2.20 (see: ENH: Streaming the selection of features to update).
So one thing you could do, is load your selections in either the Select or the Attribute widgets, the Smart Editor should pick them up when it loads.
Otherwise, you could also look into setting up a feature action in your custom widget, and on execute, start up Smart Editor and execute programmatically instead of needing a click. Create a feature action in your widget—ArcGIS Web AppBuilder | ArcGIS Developers