Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@99282 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9ee120efe5
commit
9946872d34
|
@ -30,8 +30,6 @@ import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayou
|
|||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
|
@ -85,8 +83,6 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
operationInProgressPanel.add(progressBar, new BoxLayoutData(
|
||||
new Margins(10, 5, 10, 5)));
|
||||
|
||||
|
||||
|
||||
setContent(operationInProgressPanel);
|
||||
|
||||
}
|
||||
|
@ -97,16 +93,18 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
TDGWTServiceAsync.INSTANCE.startCSVImport(importSession,
|
||||
new AsyncCallback<String>() {
|
||||
|
||||
public void onSuccess(String taskId) {
|
||||
OperationMonitorSession operationMonitorSession=new OperationMonitorSession(taskId);
|
||||
progressUpdater = new MonitorUpdater(operationMonitorSession);
|
||||
progressUpdater
|
||||
.addListener(new MonitorBarUpdater(progressBar));
|
||||
public void onSuccess(String taskId) {
|
||||
OperationMonitorSession operationMonitorSession = new OperationMonitorSession(
|
||||
taskId);
|
||||
progressUpdater = new MonitorUpdater(
|
||||
operationMonitorSession);
|
||||
progressUpdater.addListener(new MonitorBarUpdater(
|
||||
progressBar));
|
||||
|
||||
progressUpdater.addListener(thisCard);
|
||||
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
|
||||
|
||||
}
|
||||
progressUpdater.addListener(thisCard);
|
||||
progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY);
|
||||
|
||||
}
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
|
@ -135,26 +133,25 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
importCSV();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void monitorInitializing() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void monitorUpdate(float elaborated) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void monitorComplete(final TRId trId) {
|
||||
|
||||
|
||||
Command sayComplete = new Command() {
|
||||
public void execute() {
|
||||
try {
|
||||
getWizardWindow().close(false);
|
||||
Log.info("fire Complete: "+ trId);
|
||||
|
||||
Log.info("fire Complete: " + trId);
|
||||
|
||||
getWizardWindow().fireCompleted(trId);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
@ -168,7 +165,7 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
setNextButtonVisible(true);
|
||||
getWizardWindow().setEnableNextButton(true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void monitorFailed(Throwable caught, String reason,
|
||||
String failureDetails) {
|
||||
|
@ -178,8 +175,8 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
AlertMessageBox d = new AlertMessageBox("Error in Codelist Mapping Import",
|
||||
reason);
|
||||
AlertMessageBox d = new AlertMessageBox(
|
||||
"Error in Codelist Mapping Import", reason);
|
||||
d.addHideHandler(new HideHandler() {
|
||||
public void onHide(HideEvent event) {
|
||||
}
|
||||
|
@ -190,7 +187,7 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
|
||||
@Override
|
||||
public void monitorStopped(final TRId trId, String reason, String details) {
|
||||
|
||||
|
||||
Command sayComplete = new Command() {
|
||||
public void execute() {
|
||||
try {
|
||||
|
@ -225,25 +222,22 @@ public class CSVOperationInProgressCard extends WizardCard implements
|
|||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void monitorChanged(OperationMonitor operationMonitor) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void monitorAborted() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void monitorPutInBackground() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue