public void search() {
if (layer != null) {
// First we try to get the list of criteria:
List<SearchCriterion> criteria = getSearchCriteria();
if (criteria != null && !criteria.isEmpty()) {
SearchFeatureRequest request = new SearchFeatureRequest();
String value = (String) logicalOperatorRadio.getValue();
if (value.equals(I18nProvider.getSearch().radioOperatorAnd())) {
request.setBooleanOperator("AND");
} else {
request.setBooleanOperator("OR");
}
request.setCriteria(criteria.toArray(new SearchCriterion[criteria.size()]));
request.setCrs(mapModel.getCrs());
request.setLayerId(layer.getServerLayerId());
request.setMax(maximumResultSize);
request.setFilter(layer.getFilter());
request.setFeatureIncludes(GwtCommandDispatcher.getInstance().getLazyFeatureIncludesSelect());
GwtCommand command = new GwtCommand(SearchFeatureRequest.COMMAND);
command.setCommandRequest(request);
GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {