How to use adapter inside the application in worklight

前端 未结 2 1527
灰色年华
灰色年华 2020-12-18 17:21

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

相关标签:
2条回答
  • 2020-12-18 17:49

    enter image description here

    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,
        });
        }
    
    0 讨论(0)
  • 2020-12-18 18:03

    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)

    0 讨论(0)
提交回复
热议问题