Hi,
I have data in Structs Action class, I wanted to fetch data from action class. I have written jsp
isc.RestDataSource.create({
ID:“rateDataSource”,
dataURL:“Test.action”,
operationBindings : [
{ operationType:"fetch", dataProtocol:"postParams"}
],
fields:[
{name:"rate",
name:"quoteId"
}
]
});
I am able to create RestDataSource
function setGridSize()
{
fetchData();
gridSel = rateDataSource;
gridSel.draw();
}
RPCManager.showPrompt=false;
function fetchData()
{
alert("<----------1----------->");
var test = "test";
rateDataSource.fetchData(test,
function (dsResponse, data, dsRequest)
{
alert("Load data source<><><>");
var rate = data.getProperty("rate").get(0);
var quoteId = data.getProperty("quoteId").get(0);
gridSel.setValueMap("rate", rate);
gridSel.setValueMap("quoteId", quoteId);
})
}
isc.Page.setEvent(“load”, “setGridSize()”) ;
I am getting below message
Contacting server. I am able to see sysouts of action class in the console.
Please help to write fetchData() fuction to get data from action class.Thanks