type error: cannot call method 'invoke procedure' of undefined in worklight

前端 未结 1 1320
感情败类
感情败类 2020-12-22 09:05

this is my js function...

var invocationData={
                adapter : \'Health_Care\',
                procedure: \'update\',
                    paramet         


        
相关标签:
1条回答
  • 2020-12-22 10:01

    Seems like you're trying to use Worklight features in other HTML pages without having all the required script tags (worklight.js, wlclient.js, etc.). Worklight is geared towards single page applications, if you want multiple HTML files make sure all the right JavaScript is getting loaded (look at the native folder, www/default/[appname].html in the head tag).

    Here's an example: native/www/default/wlapp.html

    <!-- Static App properties + WL namespace definition -->
    <script src="wlclient/js/cordova.js"></script>
    <script src="common/js/wljq.js"></script>
    <script src="common/js/base.js"></script>
    <script src="wlclient/js/messages.js"></script>
    <script src="common/js/wlcommon.js"></script>
    <script src="wlclient/js/diagnosticDialog.js"></script>
    <script src="wlclient/js/deviceAuthentication.js"></script>
    <script src="wlclient/js/window.js"></script>
    <script src="wlclient/js/worklight.js"></script>
    <script src="wlclient/js/wlclient.js"></script>
    <!-- More script tags... -->
    

    The JavaScript file that defines WL.Client.invokeProcedure is wlclient/js/wlclient.js.

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