Hi, I want to show a message while fetching data from server using RestDataSource. I tried overriding transformRequest method of my datasource in following way:
transformRequest : function (dsRequest){
dsRequest.showPrompt = true;
dsRequest.promptStyle = "dialog";
dsRequest.prompt = "This is my message";
dsRequest.contentType = "application/xml; charset=UTF-8";
return this.Super("transformRequest", dsRequest);
}
but this doesnt work. Document says for datasource: showPrompt
“Whether RPCRequests sent by this DataSource should enable RPCRequest.showPrompt if it’s unset.”
ShowPrompt by default is true. What else needs to be done, can you please let me know??
Let me add a few more details on this I have a tabbed screen, one of the tab screen has a submit button. On click of submit button a window is opened which contains a form and this form tries to fetch data using RestDataSource.
Now my observation if I minimize the new window, I could see a dialog window behind while the form tries to fetch data using datasource. Now my problem is to show the dialog window on the top of new window.
Hi Shrut
This could happen if the window is displayed or has ‘bringToFront()’ called on it after the prompt is already visible. Note that Windows bring themselves to front on mouseUp.
Without a complete reproducible case on our end it’s difficult to know exactly how this is failing in your application but you should probably start by ensuring the window is visible before the fetch is kicked off, or if your fetch is triggered by a component within the window, ensure you return false from the click handler.