如何在worklight中使用应用程序内的适配器

我是新手工作灯。 现在我开始使用适配器。 检查此链接我的stackoverflow朋友之一有同样的疑问点击这个调用应用程序内的程序。 我正在使用的适配器是SqlAdapter。 但是在ibm worklight教程中,他们为HttpAdapter提供了示例,并在函数内部执行了该过程。 但不适用于SqlAdapter。 如果有任何建议请让我知道。 如果你想要我的来源,我会准备提供。 我的研究还在继续

从应用程序到适配器的调用对于所有类型的适配器都是相同的。

function getData() { var invocationData = { adapter : 'ADAPTER_NAME', procedure : 'PROCEDURE_NAME', parameters : [] }; WL.Client.invokeProcedure(invocationData,{ onSuccess : getDataSuccess, onFailure : getDataFailure, }); } 

有关更多信息,请查看模块6 – 从客户端应用程序调用适配器过程(PDF,370KB)以及练习和代码示例(ZIP,53.7KB)

在此处输入图像描述

在这里,我检索了价值观。 但它没有在html页面中显示。 这是我的代码

 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, }); }