Im new to worklight. Now im started using adapter. Check this link one of my stackoverflow friend have same doubt click this Calling the procedure inside the application. Th
Here i retrieved the values. but its not displaying in html page. this is my code
function wlCommonInit(){
// Common initialization code goes here
WL.Logger.debug("inside the wlcommoninit");
busyIndicator = new WL.BusyIndicator('AppBody');
getData();
}
function loadFeedsSuccess(result){
WL.Logger.debug("Feed retrieve success");
}
function loadFeedsFailure(result){
WL.Logger.error("Feed retrieve failure");
}
function getData() {
var invocationData = {
adapter : 'SqlAdap',
procedure : 'procedure1',
parameters : []
};
WL.Client.invokeProcedure(invocationData,{
onSuccess : loadFeedsSuccess,
onFailure : loadFeedsFailure,
});
}
The call from an application to an adapter is the same for all types of adapters.
function getData() {
var invocationData = {
adapter : 'ADAPTER_NAME',
procedure : 'PROCEDURE_NAME',
parameters : []
};
WL.Client.invokeProcedure(invocationData,{
onSuccess : getDataSuccess,
onFailure : getDataFailure,
});
}
For more information check module 6 - Invoking Adapter Procedures from the Client Applications (PDF, 370KB) and the exercise and code sample (ZIP, 53.7KB)