How to use custom storage type for liferay 7 forms?

人盡茶涼 提交于 2019-12-13 21:46:08

问题


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

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

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.

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


回答1:


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.



来源:https://stackoverflow.com/questions/46196456/how-to-use-custom-storage-type-for-liferay-7-forms

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!