AnsweredAssumed Answered

registry.byId returning undefined for existing widget in WAB2.8

Question asked by alterwiel on May 16, 2018
Latest reply on May 17, 2018 by rscheitlin

I have a custom widget settings file that is calling dijit.registry.byId on a textbox that I know exists, but the function is returning undefined. This is occurring in the settings startup function and only began failing when I migrated from WAB2.7 to 2.8.



startup: function () {

                var textNode = registry.byId("maxZoomTextBox");
                if (textNode)
                    textNode.set('value', this.config.maxZoom);
    <input id="maxZoomTextBox" data-dojo-type="dijit/form/TextBox" type="text" style="width:40px;"/>
    <br />
    <br />
    <br />
    <div class="jimu-widget-clusterer-setting-layers-container" data-dojo-attach-point="layersContainer" id="layersContainerDiv">
    <div class="jimu-btn add-featurelayer" data-dojo-attach-point="addFeaturelayer" data-dojo-attach-event="onclick:_onBtnAddFeaturelayerClicked">Add feature layer</div>


textNode always = undefined

Can anyone see what I'm doing wrong?