问题
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