AnsweredAssumed Answered

webscript from a button

Question asked by riadhazzouz on Apr 16, 2019
Latest reply on Apr 17, 2019 by angelborroy

I am trying to invoke a custom java backed webscript from a button I created in a custom widget js file.
here is my code : 

 

var id=5
var myButton = new AlfButton({
label: "Supprimer",
onClick: function(){
var url = Alfresco.constants.PROXY_URI + "test/delete?id="+id;

this.serviceXhr({url : url,
method: "GET"});
}
});
domConstruct.place(myButton.domNode,"id");

the button is being displayed and when I try a simple alert message, it works good.
but when I try the previous code, nothing happens. Any ideas ?

Outcomes