使用HTTP适配器进行同步的IBM Worklight JSON存储 [英] IBM Worklight JSON Store with Sync using HTTP Adapter

查看:106
本文介绍了使用HTTP适配器进行同步的IBM Worklight JSON存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在应用程序加载时从数据库加载数据? 如何将数据推送到数据库? IBM Worklight提供的示例有助于从JSON存储中加载数据,但是如何使用HTTP适配器来获取数据并加载?

How to load data from database on load of the application? How to push data to database? The sample given by IBM Worklight helps to load data from JSON store, but how to use HTTP Adapter to fetch data and load?

推荐答案

阅读

Read the documentation and look at the JSONStore getting started modules and code samples.

如何在应用程序加载时从数据库加载数据?

How to load data from database on load of the application?

使用加载.您也可以使用 jQuery.ajax ,然后调用添加以及响应数据.

Use load. You can also do it with WL.Client.invokeProcedure or jQuery.ajax and then call add with the response data.

如何将数据推送到数据库?

How to push data to database?

使用 push 或通过

Use push or get the documents with local-only changes with getPushRequired and use WL.Client.invokeProcedure or jQuery.ajax to send data back to the backend.

上面链接的所有方法都有示例.您应该能够弄清楚如何使这些示例适合您的需求.

All the methods linked above have examples. You should be able to figure out how to adapt those examples to your needs.

这篇关于使用HTTP适配器进行同步的IBM Worklight JSON存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆