execute(vlayer, null);
}
public void execute(final VectorLayer vectorLayer, final Callback onFinished) {
if (this.layer.equals(vectorLayer)) {
ExportToCsvRequest exportRequest = new ExportToCsvRequest();
exportRequest.setSearchFeatureRequest(getSearchFeatureRequest());
exportRequest.setSearchByLocationRequest(getSearchByLocationRequest(vectorLayer));
exportRequest.setSearchByCriterionRequest(getSearchCriterionRequest());
exportRequest.setEncoding(messages.exportToCsvEncoding());
exportRequest.setLocale(messages.exportToCsvLocale());
exportRequest.setSeparatorChar(messages.exportToCsvSeparatorChar());
exportRequest.setQuoteChar(messages.exportToCsvQuoteChar());
exportRequest.setLayerId(layer.getServerLayerId());
GwtCommand command = new GwtCommand(ExportToCsvRequest.COMMAND);
command.setCommandRequest(exportRequest);
Deferred deferred = GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {
private static final String CONTENT_PRE = "<div style='margin-top: 20px; width: 200px; text-align: "