command.setCommandRequest(request);
commandService.execute(command, new CommandCallback() {
public void onSuccess(CommandResponse response) {
if (response instanceof SearchFeatureResponse) {
SearchFeatureResponse sfr = (SearchFeatureResponse) response;
List<Feature> features = new ArrayList<Feature>();
for (org.geomajas.layer.feature.Feature feature : sfr.getFeatures()) {
features.add(new FeatureImpl(feature, layer));
}
callback.execute(features);
}
}