如何为Liferay 7表单使用自定义存储类型? [英] How to use custom storage type for liferay 7 forms?

查看:144
本文介绍了如何为Liferay 7表单使用自定义存储类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在按照本教程创建高级FORMS ,但是我不明白如何使用外部数据库存储表单数据.

I am following this tutorial CREATING ADVANCED FORMS, but I am not able to understand how to use external database for storing form data.

我找不到有关此概念的任何教程.我正在使用liferay 7 CE. 另外,教程说

I cant find any tutorial about this concept. I am using liferay 7 CE. Also tutorial says that

如果不使用JSON,开发人员可以实现自己的存储类型 理想的.如果他们这样做,该选项将出现在表单设置"中. 有关更多信息,请参见有关自定义存储类型(尚未编写)的教程. 信息.

developers can implement their own storage types if JSON is not desirable. If they do, the option will appear here in Form Settings. See the tutorial on custom storage types (not yet written) for more information.

我的问题是要使用哪个服务包装程序,我无法理解如何知道将哪个Service用于表格.

My question is which service-wrapper to use, I cant understand how to know which Service is being used for forms.

推荐答案

仅当您在表单设置中创建新表单时才能更改存储类型. JSON类型是默认类型,但是您可以创建一个新的StorageAdapter来创建其他类型.

You can change the storage type only when you are creating a new form in the form settings. The JSON type is the default but you can create a new StorageAdapterto create additional types.

看看

Have a look at the JSONStorageAdapter to get an inspiration how to develop a custom one. Should be enough to create a bundle put the new class in. Extend the BaseStorageAdapter and implement new necessary methods.

新类将在部署后提取,您应该在表单"设置中获得一个新选项.

The new class will be picked up after deployment and you should get a new option in the Form settings.

这篇关于如何为Liferay 7表单使用自定义存储类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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