return (WOComponent)lpi;
}
private EODatabaseDataSource queryDatasource(String entityName) {
EOEditingContext ec = session().defaultEditingContext();
EODatabaseDataSource ds = new EODatabaseDataSource(ec, entityName);
NSArray searchKeys = (NSArray) valueForBinding("searchKeys");
if(searchKeys == null) {
searchKeys = ERXEOControlUtilities.stringAttributeListForEntityNamed(ec, entityName);
}
EOQualifier qualifier = ERXEOControlUtilities.qualifierMatchingAnyKey(searchKeys, EOQualifier.QualifierOperatorCaseInsensitiveLike, "*" + searchValue + "*");
EOQualifier restrictingQualifier = (EOQualifier) valueForBinding("extraRestrictingQualifier");
if(restrictingQualifier != null) {
qualifier = new EOAndQualifier(new NSArray(new Object[]{qualifier, restrictingQualifier}));
}
EOFetchSpecification fs = new EOFetchSpecification(entityName, qualifier, null);
ds.setFetchSpecification(fs);
return ds;
}