Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
397 views
in Technique[技术] by (71.8m points)

android - How to use adapter inside the application in worklight

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. The Adapter im using is SqlAdapter. But in the ibm worklight tutorial they gave example for HttpAdapter and clubing the procedure inside the function. But not for SqlAdapter. If any suggestion kindly let me know. if u want to my source i will ready to provide. Still my research continues

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...