Skip to content
Snippets Groups Projects
Commit 48800996 authored by buczekp's avatar buczekp
Browse files

minor: introduced AsyncCallbackWithProgressBar decorator

SVN: 15682
parent ff2c4bd0
No related branches found
No related tags found
No related merge requests found
Showing
with 138 additions and 70 deletions
/*
* Copyright 2008 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.generic.client.web.client.application;
import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.ProgressBar;
import com.google.gwt.user.client.rpc.AsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils;
/**
* {@link AsyncCallback} decorator adding a progress bar that is visible until response is received
* from a RPC call.
*
* @author Piotr Buczek
*/
public class AsyncCallbackWithProgressBar<T> implements AsyncCallback<T>
{
/**
* Decorates given callback with a progress bar containing given message.
*/
public static <T> AsyncCallbackWithProgressBar<T> decorate(AsyncCallback<T> decoratedCallback,
String progressMessage)
{
return new AsyncCallbackWithProgressBar<T>(decoratedCallback, progressMessage);
}
private final AsyncCallback<T> decoratedCallback;
private final Dialog progressBar;
private AsyncCallbackWithProgressBar(AsyncCallback<T> decoratedCallback, String progressMessage)
{
super();
this.decoratedCallback = decoratedCallback;
this.progressBar = createAndShowProgressBar(progressMessage);
}
public void onFailure(Throwable caught)
{
progressBar.hide();
decoratedCallback.onFailure(caught);
}
public void onSuccess(T result)
{
progressBar.hide();
decoratedCallback.onSuccess(result);
}
private final static Dialog createAndShowProgressBar(final String title)
{
ProgressBar progressBar = new ProgressBar();
progressBar.auto();
Dialog dialog = new Dialog();
GWTUtils.setToolTip(dialog, title);
dialog.add(progressBar);
dialog.setButtons("");
dialog.setAutoHeight(true);
dialog.setClosable(false);
dialog.addText(title);
dialog.setResizable(false);
dialog.show();
return dialog;
}
}
...@@ -25,9 +25,11 @@ import com.extjs.gxt.ui.client.widget.button.Button; ...@@ -25,9 +25,11 @@ import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.form.RadioGroup; import com.extjs.gxt.ui.client.widget.form.RadioGroup;
import com.extjs.gxt.ui.client.widget.menu.Menu; import com.extjs.gxt.ui.client.widget.menu.Menu;
import com.extjs.gxt.ui.client.widget.menu.MenuItem; import com.extjs.gxt.ui.client.widget.menu.MenuItem;
import com.google.gwt.user.client.rpc.AsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AsyncCallbackWithProgressBar;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.ActionMenu; import ch.systemsx.cisd.openbis.generic.client.web.client.application.menu.ActionMenu;
...@@ -36,7 +38,6 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.ColumnC ...@@ -36,7 +38,6 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.ColumnC
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.AbstractExternalDataGrid.SelectedAndDisplayedItems; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.AbstractExternalDataGrid.SelectedAndDisplayedItems;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.SelectedOrAllDataSetsRadioProvider.ISelectedDataSetsProvider; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data.SelectedOrAllDataSetsRadioProvider.ISelectedDataSetsProvider;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractDataConfirmationDialog; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.widget.AbstractDataConfirmationDialog;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedActionWithResult; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedActionWithResult;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IMessageProvider; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IMessageProvider;
...@@ -188,58 +189,56 @@ public class DataSetArchivingMenu extends MenuItem ...@@ -188,58 +189,56 @@ public class DataSetArchivingMenu extends MenuItem
case ARCHIVE: case ARCHIVE:
viewContext.getService().archiveDatasets( viewContext.getService().archiveDatasets(
criteria, criteria,
new ArchivingDisplayCallback(viewContext, taskKind createArchivingDisplayCallback(taskKind.getDescription(),
.getDescription(), computeOnSelected)); computeOnSelected));
break; break;
case UNARCHIVE: case UNARCHIVE:
viewContext.getService().unarchiveDatasets( viewContext.getService().unarchiveDatasets(
criteria, criteria,
new ArchivingDisplayCallback(viewContext, taskKind createArchivingDisplayCallback(taskKind.getDescription(),
.getDescription(), computeOnSelected)); computeOnSelected));
break; break;
case LOCK: case LOCK:
viewContext.getService().lockDatasets( viewContext.getService().lockDatasets(
criteria, criteria,
new ArchivingDisplayCallback(viewContext, taskKind createArchivingDisplayCallback(taskKind.getDescription(),
.getDescription(), computeOnSelected)); computeOnSelected));
break; break;
case UNLOCK: case UNLOCK:
viewContext.getService().unlockDatasets( viewContext.getService().unlockDatasets(
criteria, criteria,
new ArchivingDisplayCallback(viewContext, taskKind createArchivingDisplayCallback(taskKind.getDescription(),
.getDescription(), computeOnSelected)); computeOnSelected));
break; break;
} }
} }
}; };
} }
private AsyncCallback<ArchivingResult> createArchivingDisplayCallback(String actionName,
boolean computeOnSelected)
{
return AsyncCallbackWithProgressBar.decorate(new ArchivingDisplayCallback(viewContext,
actionName, computeOnSelected), "Schedulling " + actionName + "...");
}
private final class ArchivingDisplayCallback extends AbstractAsyncCallback<ArchivingResult> private final class ArchivingDisplayCallback extends AbstractAsyncCallback<ArchivingResult>
{ {
private final String actionName; private final String actionName;
private final boolean computeOnSelected; private final boolean computeOnSelected;
private final Dialog progressBar;
private ArchivingDisplayCallback(IViewContext<?> viewContext, String actionName, private ArchivingDisplayCallback(IViewContext<?> viewContext, String actionName,
boolean computeOnSelected) boolean computeOnSelected)
{ {
super(viewContext); super(viewContext);
this.actionName = actionName; this.actionName = actionName;
this.computeOnSelected = computeOnSelected; this.computeOnSelected = computeOnSelected;
this.progressBar = createAndShowProgressBar();
}
private Dialog createAndShowProgressBar()
{
return GWTUtils.createAndShowProgressBar("Scheduling " + actionName + "...");
} }
@Override @Override
public final void process(final ArchivingResult result) public final void process(final ArchivingResult result)
{ {
progressBar.hide();
final String source = computeOnSelected ? "selected" : "provided"; final String source = computeOnSelected ? "selected" : "provided";
if (result.getScheduled() == 0) if (result.getScheduled() == 0)
{ {
...@@ -254,12 +253,6 @@ public class DataSetArchivingMenu extends MenuItem ...@@ -254,12 +253,6 @@ public class DataSetArchivingMenu extends MenuItem
} }
} }
@Override
public void finishOnFailure(Throwable caught)
{
progressBar.hide();
super.finishOnFailure(caught);
}
} }
private static class PerformArchivingDialog extends private static class PerformArchivingDialog extends
......
...@@ -36,6 +36,7 @@ import com.extjs.gxt.ui.client.widget.menu.Menu; ...@@ -36,6 +36,7 @@ import com.extjs.gxt.ui.client.widget.menu.Menu;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AsyncCallbackWithProgressBar;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict; import ch.systemsx.cisd.openbis.generic.client.web.client.application.Dict;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier; import ch.systemsx.cisd.openbis.generic.client.web.client.application.help.HelpPageIdentifier;
...@@ -167,16 +168,22 @@ public class DataSetComputeMenu extends TextToolItem ...@@ -167,16 +168,22 @@ public class DataSetComputeMenu extends TextToolItem
DataSetReportGenerator.generate(viewContext, service, criteria); DataSetReportGenerator.generate(viewContext, service, criteria);
break; break;
case PROCESSING: case PROCESSING:
viewContext.getService().processDatasets(service, criteria, viewContext.getService().processDatasets(
new ProcessingDisplayCallback(viewContext)); service,
criteria,
AsyncCallbackWithProgressBar.decorate(
new ProcessingDisplayCallback(viewContext),
"Scheduling processing..."));
break; break;
} }
} }
}; };
} }
private final class ProcessingDisplayCallback extends AbstractAsyncCallback<Void> private final class ProcessingDisplayCallback extends AbstractAsyncCallback<Void>
{ {
private ProcessingDisplayCallback(IViewContext<?> viewContext) private ProcessingDisplayCallback(IViewContext<?> viewContext)
{ {
super(viewContext); super(viewContext);
...@@ -187,6 +194,12 @@ public class DataSetComputeMenu extends TextToolItem ...@@ -187,6 +194,12 @@ public class DataSetComputeMenu extends TextToolItem
{ {
MessageBox.info("Processing", "Processing has been scheduled successfully.", null); MessageBox.info("Processing", "Processing has been scheduled successfully.", null);
} }
@Override
public void finishOnFailure(Throwable caught)
{
super.finishOnFailure(caught);
}
} }
private static class ComputationData implements ISelectedDataSetsProvider private static class ComputationData implements ISelectedDataSetsProvider
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data; package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.data;
import com.google.gwt.user.client.rpc.AsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.AbstractTabItemFactory; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.AbstractTabItemFactory;
...@@ -30,6 +32,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report. ...@@ -30,6 +32,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.ReportGrid; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.ReportGrid;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.ReportGeneratedCallback.IOnReportComponentGeneratedAction; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.ReportGeneratedCallback.IOnReportComponentGeneratedAction;
import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DisplayedOrSelectedDatasetCriteria; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.DisplayedOrSelectedDatasetCriteria;
import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableModelReference;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatastoreServiceDescription; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatastoreServiceDescription;
/** /**
...@@ -57,8 +60,8 @@ public class DataSetReportGenerator ...@@ -57,8 +60,8 @@ public class DataSetReportGenerator
DatastoreServiceDescription service, DisplayedOrSelectedDatasetCriteria criteria, DatastoreServiceDescription service, DisplayedOrSelectedDatasetCriteria criteria,
IOnReportComponentGeneratedAction action) IOnReportComponentGeneratedAction action)
{ {
ReportGeneratedCallback callback = AsyncCallback<TableModelReference> callback =
new ReportGeneratedCallback(viewContext, service, action); ReportGeneratedCallback.create(viewContext, service, action);
viewContext.getService().createReportFromDatasets(service, criteria, callback); viewContext.getService().createReportFromDatasets(service, criteria, callback);
} }
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report; package ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report;
import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.MessageBox; import com.extjs.gxt.ui.client.widget.MessageBox;
import com.google.gwt.user.client.rpc.AsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync; import ch.systemsx.cisd.openbis.generic.client.web.client.ICommonClientServiceAsync;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.application.AbstractAsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.AsyncCallbackWithProgressBar;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.IDisposableComponent; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.IDisposableComponent;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.GWTUtils;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.StringUtils; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.StringUtils;
import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableModelReference; import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableModelReference;
import ch.systemsx.cisd.openbis.generic.shared.basic.IReportInformationProvider; import ch.systemsx.cisd.openbis.generic.shared.basic.IReportInformationProvider;
...@@ -40,13 +40,20 @@ public class ReportGeneratedCallback extends AbstractAsyncCallback<TableModelRef ...@@ -40,13 +40,20 @@ public class ReportGeneratedCallback extends AbstractAsyncCallback<TableModelRef
private final IViewContext<ICommonClientServiceAsync> viewContext; private final IViewContext<ICommonClientServiceAsync> viewContext;
private final Dialog progressBar;
private final IOnReportComponentGeneratedAction action; private final IOnReportComponentGeneratedAction action;
private final IReportInformationProvider reportInformationProvider; private final IReportInformationProvider reportInformationProvider;
public ReportGeneratedCallback(IViewContext<ICommonClientServiceAsync> viewContext, public static AsyncCallback<TableModelReference> create(
IViewContext<ICommonClientServiceAsync> viewContext,
IReportInformationProvider reportInformationProvider,
IOnReportComponentGeneratedAction action)
{
return AsyncCallbackWithProgressBar.decorate(new ReportGeneratedCallback(viewContext,
reportInformationProvider, action), "Generating the report...");
}
private ReportGeneratedCallback(IViewContext<ICommonClientServiceAsync> viewContext,
IReportInformationProvider reportInformationProvider, IReportInformationProvider reportInformationProvider,
IOnReportComponentGeneratedAction action) IOnReportComponentGeneratedAction action)
{ {
...@@ -54,18 +61,11 @@ public class ReportGeneratedCallback extends AbstractAsyncCallback<TableModelRef ...@@ -54,18 +61,11 @@ public class ReportGeneratedCallback extends AbstractAsyncCallback<TableModelRef
this.viewContext = viewContext; this.viewContext = viewContext;
this.reportInformationProvider = reportInformationProvider; this.reportInformationProvider = reportInformationProvider;
this.action = action; this.action = action;
this.progressBar = createAndShowProgressBar();
}
private Dialog createAndShowProgressBar()
{
return GWTUtils.createAndShowProgressBar("Generating the report...");
} }
@Override @Override
protected void process(final TableModelReference tableModelReference) protected void process(final TableModelReference tableModelReference)
{ {
progressBar.hide();
final IDisposableComponent reportComponent = final IDisposableComponent reportComponent =
ReportGrid.create(viewContext, tableModelReference, reportInformationProvider); ReportGrid.create(viewContext, tableModelReference, reportInformationProvider);
action.execute(reportComponent); action.execute(reportComponent);
...@@ -75,11 +75,4 @@ public class ReportGeneratedCallback extends AbstractAsyncCallback<TableModelRef ...@@ -75,11 +75,4 @@ public class ReportGeneratedCallback extends AbstractAsyncCallback<TableModelRef
} }
} }
@Override
public void finishOnFailure(Throwable caught)
{
progressBar.hide();
super.finishOnFailure(caught);
}
} }
...@@ -22,8 +22,6 @@ import java.util.List; ...@@ -22,8 +22,6 @@ import java.util.List;
import com.extjs.gxt.ui.client.data.ModelData; import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.store.ListStore; import com.extjs.gxt.ui.client.store.ListStore;
import com.extjs.gxt.ui.client.widget.Component; import com.extjs.gxt.ui.client.widget.Component;
import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.ProgressBar;
import com.extjs.gxt.ui.client.widget.form.ComboBox; import com.extjs.gxt.ui.client.widget.form.ComboBox;
import com.extjs.gxt.ui.client.widget.form.Field; import com.extjs.gxt.ui.client.widget.form.Field;
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel; import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
...@@ -270,24 +268,6 @@ public final class GWTUtils ...@@ -270,24 +268,6 @@ public final class GWTUtils
"$", "-DOLLAR-"); "$", "-DOLLAR-");
} }
public final static Dialog createAndShowProgressBar(final String title)
{
ProgressBar progressBar = new ProgressBar();
progressBar.auto();
Dialog dialog = new Dialog();
GWTUtils.setToolTip(dialog, title);
dialog.add(progressBar);
dialog.setButtons("");
dialog.setAutoHeight(true);
dialog.setClosable(false);
dialog.addText(title);
dialog.setResizable(false);
dialog.show();
return dialog;
}
// //
// native JavaScript // native JavaScript
// //
......
...@@ -309,7 +309,7 @@ public class QueryEditor extends Dialog ...@@ -309,7 +309,7 @@ public class QueryEditor extends Dialog
viewContext.getService().createQueryResultsReport( viewContext.getService().createQueryResultsReport(
sqlStatement, sqlStatement,
parameterBindings, parameterBindings,
new ReportGeneratedCallback(viewContext.getCommonViewContext(), ReportGeneratedCallback.create(viewContext.getCommonViewContext(),
createReportInformationProvider(sqlStatement), createReportInformationProvider(sqlStatement),
createDisplayQueryResultsAction())); createDisplayQueryResultsAction()));
} }
......
...@@ -22,6 +22,7 @@ import com.extjs.gxt.ui.client.widget.Component; ...@@ -22,6 +22,7 @@ import com.extjs.gxt.ui.client.widget.Component;
import com.extjs.gxt.ui.client.widget.ContentPanel; import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.layout.FitLayout; import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.rpc.AsyncCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext; import ch.systemsx.cisd.openbis.generic.client.web.client.application.IViewContext;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DatabaseModificationAwareComponent; import ch.systemsx.cisd.openbis.generic.client.web.client.application.framework.DatabaseModificationAwareComponent;
...@@ -30,6 +31,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.ID ...@@ -30,6 +31,7 @@ import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.grid.ID
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.ReportGeneratedCallback; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.ReportGeneratedCallback;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.ReportGeneratedCallback.IOnReportComponentGeneratedAction; import ch.systemsx.cisd.openbis.generic.client.web.client.application.ui.report.ReportGeneratedCallback.IOnReportComponentGeneratedAction;
import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction; import ch.systemsx.cisd.openbis.generic.client.web.client.application.util.IDelegatedAction;
import ch.systemsx.cisd.openbis.generic.client.web.client.dto.TableModelReference;
import ch.systemsx.cisd.openbis.generic.shared.basic.IReportInformationProvider; import ch.systemsx.cisd.openbis.generic.shared.basic.IReportInformationProvider;
import ch.systemsx.cisd.openbis.generic.shared.basic.TechId; import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatabaseModificationKind; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatabaseModificationKind;
...@@ -94,8 +96,8 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb ...@@ -94,8 +96,8 @@ public class QueryViewer extends ContentPanel implements IDatabaseModificationOb
{ {
return; return;
} }
ReportGeneratedCallback callback = AsyncCallback<TableModelReference> callback =
new ReportGeneratedCallback(viewContext.getCommonViewContext(), ReportGeneratedCallback.create(viewContext.getCommonViewContext(),
createReportInformationProvider(sqlQueryOrNull), createReportInformationProvider(sqlQueryOrNull),
createDisplayQueryResultsAction()); createDisplayQueryResultsAction());
if (queryIdOrNull != null) if (queryIdOrNull != null)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment