Child pages
  • Providing Converters and Validators from Plugins

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to build a column converter, you need your plugin class implementing the IClientPlugin interface (see Implement the plugin interface) also needs to implement the interface IColumnConverterProvider to produce ITypedColumnConverter instances in the getColumnConverters() method. See API docs.

...

For an example of a column converter, see the NrToJodaConverter class in the example given on Providing UI Converters from plugins page.

The implemented column converters returned by the getColumnConverters() method of the plugin class implementing the IColumnConverterProvider interface, will be checked by the plugin manager which will add them to the list of Servoy column converters.

Column Validators

In order to build a column validator, you need your plugin class implementing the IClientPlugin interface (see Implement the plugin interface) also needs to implement the interface IColumnValidatorProvider to produce IColumnValidator instances in the getColumnValidators() method. See API docs.

...

An IColumnValidator can also define properties whose values will be set by the developer in UI, in the Validation tab.

The implemented column validators returned by the getColumnValidators() method of the plugin class implementing the IColumnValidatorProvider interface, will be checked by the plugin manager which will add them to the list of Servoy column validators.

Example

This is an example of validating the size of a column of type TEXT or MEDIA. The validation rule is that the size must be lower or equal to the value given by the developer by setting the length property in the Validation tab.

...