<div data-dojo-type="dojo/store/Memory" data-dojo-id="myStore">
<script type="dojo/method">
require([
"dojo/request/xhr",
"dojo/domReady!"
]),
function(xhr){
debugger;
alert();
var xhrArgs = {
method:"POST",
data: 'query={DATA:{},COMMAND:"GETSTAFFVIEW"}',
handleAs: "json"
}
var def = xhr("viewQueryManager", xhrArgs);
def.then(function(data){
console.log(data);
alert(data);
this.setData(data);
}, function () {
alert("AjaxError");
})
}
</script>
</div> |