Hi,
I need help with the integration of LookupField with the CustomCollectionDatasource.
If I set optionsDatasource to the CustomCollectionDatasource, LookupField does not get data from it when I entering text (the getEntities method is not executed or executed only once if refreshMode=“NEVER” is not set).
My custom datasource:
public class ExternalDocumentsDatasource extends CustomCollectionDatasource<ExternalDocument, String> {
@Override
protected Collection<ExternalDocument> getEntities(Map<String, Object> params) {
return myService.getData(params)
}
}
XML
<collectionDatasource id="externalDocumentsDs"
class="com.company.transport.entity.ExternalDocument" datasourceClass="com.company.transport.web.transportpackage.ExternalDocumentsDatasource"
refreshMode="NEVER"/>
<lookupField id="externalDocumentField"
datasource="transportPackageDs"
optionsDatasource="externalDocumentsDs"
property="externalDocument"
width="100%"/>
Regards
Marcin