Hi all,
I have a datasource on which I have applied a server side custom valdiator. This datasource is being used at many places So I want to move this validator from ds.xml to listgrid field.
Is it possible to move it to listgrid field like below :
Thanks in advance.
I have a datasource on which I have applied a server side custom valdiator. This datasource is being used at many places So I want to move this validator from ds.xml to listgrid field.
Code:
<validators>
<validator type="serverCustom">
<serverObject lookupStyle="spring"
bean="myValidator"
className="com.server.services.impl.MyValidator" />
<errorMessage>Data already exists</errorMessage>
</validator>
</validators>
Code:
ListGridField field = new ListGridfield("name","title");
Validator validator = new Validator();
// here I can set the valdiator type to serverCustom but how do I provide other attributes?
field.setValidators(validator);
Comment