我们正在使用WL 5.0.6.1,但我们没有在文档中找到所有信息。
在WorkingOffline PDF中:http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v600/05_04_Working_offline.pdf它说:“两个WL.Events.WORKLIGHT_IS_CONNECTED和 可以触发WL.Events.WORKLIGHT_IS_DISCONNECTED事件 在指定的情况下通过心跳“
答案 0 :(得分:0)
onSuccess上的对象可以是从invodeResult包含的后端返回的任何(JSON)对象以及isSuccessful和errors属性:
An object that contains the data that is returned by the invoked procedure, and the invocation status. Its format is as follows:
**invocationResult = {
isSuccessful: Boolean,
errors : "Error Message"
// Procedure results go here
}**
Where:
isSuccessful – Contains true if the procedure invocation succeeded, false otherwise. If the invocation failed, the failure handler for the request is called.
errors – An optional array of strings containing error messages.
对于失败:
The procedure was called but failed. In this case, the invocationResult property is added to the response received by the failure handler. This property has the same structure as the invocationResult property returned to the success handler, but the value of the isSuccessful attribute is false. For the structure of the invocationResult property, see invocationResult.