AnsweredAssumed Answered

Inserting button after field in AttributeInspector

Question asked by evtguy on Dec 15, 2015
Latest reply on Dec 15, 2015 by evtguy

The subject line is pretty self explanatory. I'm having trouble doing it, though. I'm using this sample as a guideline.

 

I have a text field which represents a file path and I want to insert a button next to the field which then fires off the folder browser from the HTML5 File API. I've placed the attribute inspector inside a hidden div which gets displayed if a user control clicks on a feature in the map. Anyways, my "Cancel" button shows up fine but the code chokes (no error in the console) when it comes to inserting my simple button after the relevant text field:

 

            app.attInspector = new AttributeInspector({
              layerInfos: layerInfos
            }, 'prjDetailEditor');

            var cancelButton = new Button({ label: "Cancel", "class": "cancelButton"},domConstruct.create("div"));
            domConstruct.place(cancelButton.domNode, app.attInspector.deleteBtn.domNode, "after");

            var photoPathButton = new Button({ label: "Photo Path", "class": "openFolderIcon", showLabel: false},domConstruct.create("div"));
            var photoPathField = dijit.byId('dijit_form_TextBox_6');
            domConstruct.place(photoPathButton.domNode, photoPathField.domNode, "after");

 

If I set a breakpoint on the last line (domConstruct..), photoPathButton exists but photoPathField is undefined. Is there a method associated with the AttributeInspector such that I can search for and get a reference to my particular text field?

 

Thanks,

Steve

Outcomes