How can I detect Editor widget combo box change?

11-11-2019 06:02 AM
New Contributor III

I'm modifying the editor widget to create a cascading select but I'm having a very difficult time finding out where the attribute html elements get created.

I've tracked down where the editing starts in Widget.js (_startEditingSession) under attributeInspector.onAttributeChange but that doesn't exactly do what I want.  I would like to have an attribute that must be set to 'Yes' in order for a user to save.  I tried using

   if(attributeInspector.params.layerInfos[0].fieldInfos[5].dijit.displayedValue == 'Yes'){
            } else{

but I found that if I changed yes to no and no to yes it would not disable and enable correctly.  Since only the displayValue changes and not the actual value the onAttributeChange wouldn't run.  I sometimes had to change another attribute to run what I wanted. 

I thought attaching a listener directly to the combobox would let me detect displayvalue change.  I tried to query the object by widgetid but found that it changes.

Thanks for the help!

0 Kudos
0 Replies