I am using DOJO framework with SLX (Version 8) to create some custom entities. I have presentation layer wherein layout of the form is created with following format. Following picklist exists in the form. "<select id="pklLoc" title="Location:"></select>" + There is another JS file wherein all business logic exists. I am making some AJAX call to accomplish some web service calls.
//////////////////////////////////////////////////////////////////////////
getServiceTaskDisplayRules: function () {
var self = this; this._loading = true; return this._sandbox.ajax.xhrRawPost("TimeLinx/Services/ServiceTaskDataServiceHelper.ashx/GetServiceTaskDisplayRules", JSON.stringifyWcf(this), { headers: { "Content-Type": "application/json" } })
.then(function (dataString) {
self.setDisplayRules(self, dataString);
self._displayRules = dataString;
return dataString; }); },
/////////////////////////////////////////////////////////////////////////////////////////////
On return I need to Enable/disable some control but I am not able to do it, I have tried following approaches.
// dataString.PreventLocationChange
//this.set('Location', "Office");
// this works fine
// this.get('Location');
// this.ta_confirmationResponse.set('disabled', true);
//self.get('Location');
// var test = $('#_pklLocation');
// dojo.byId('dvLocation').disabled=true;
// dojo.byId('pklLoc').disabled = true;
// dojo.byId(this.pklLoc).disabled = true;
// dijit.byId(this.pklLoc).disabled = true;
// dijit.byId('pklLoc').disabled = true;
// gave ID property to control this works fine but control is not getting disabled.
// $('#dvLocation :input').attr('disabled', true);
Please help.
Thank you
Gaurang |