Select to view content in your preferred language

Re: How to dynamically change dojo element values?

618
0
05-06-2020 02:09 AM
DávidGregor
Emerging Contributor

Could you help me in this? I'm trying the same method, without luck.

I'm trying to add progammatic values to the editor widget's input box, because i don't know how to store webmap itemID in a better way.

I tried some method, but no success.

in RelatedRecordsEditor.js:

    _init: function() {
      this.refDomNode = this.editorATI.domNode;
      this.originalLayer = this.originalFeature.getLayer();
      this.layerInfosObj = jimuLayerInfos.getInstanceSync();
      this.originalJimuLayerInfo = this.layerInfosObj.getLayerOrTableInfoById(this.originalLayer.id);
      this.undoManager = new UndoManager();
      this._temporaryData = {
        eventHandles: [],
        dijits: []
      };
      this._tempPopup = new Popup({/*titleInBody: false*/}, html.create('div'));
      this._tempPopup.show();
      var mapIDbox = dojo.byId("dijit_form_ValidationTextBox_1");
      console.log(mapIDbox)
      mapIDbox.set('value''myValue');
      document.getElementById("dijit_form_ValidationTextBox_1").value = "myValue";
      //dojo.byId("dijit_form_ValidationTextBox_1").value = "myvalue";
      //mapID.setValue = "myValue";

console.log:

<input class="dijitReset dijitInputInner" data-dojo-attach-point="textbox,focusNode" autocomplete="off" type="text" tabindex="0" id="dijit_form_ValidationTextBox_1" maxlength="50" aria-required="false" value="" aria-invalid="false">

0 Kudos
0 Replies