IPluginDataSource
Interface IPluginDataSource
Use cases
This type of plugin can be used to provide select fields with custom data from external web services, such as a list of countries, zip codes, etc.
Method signature
Parameters
The method resolve is passed an object implementing IPluginDataSourceParams, which contains getters for the following properties:
- Projekt
The form for which this plugin has been called. - Mandant
The client to which the form belongs to. - SessionAttributes
- RequestParameters
Return value
The method must return an object implementing IPluginDataSourceRetVal. The class PluginDataSourceRetVal provides a reference implementation.
This object allows you to return a serializable JSON array containing the value that should be shown in the select field. The array must consist of objects, each object must contain the properties TEXT and VALUE, which represent the text that will be displayed and the value that will be send as the value of the form field when the form is submitted.
The exception FCPluginException will be thrown when an exception occurs while the plugin is being processed.