Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@98984 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
52c19d7f56
commit
38678527cb
|
@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.AvailableCharsetList;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.AvailableCharsetList;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVRowError;
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVRowError;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.csv.CheckCSVSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
||||||
|
|
||||||
|
@ -247,7 +248,7 @@ public class CSVConfigCard extends WizardCard {
|
||||||
csvCheckPanel.getCheckConfiguration().setEnabled(false);
|
csvCheckPanel.getCheckConfiguration().setEnabled(false);
|
||||||
|
|
||||||
TDGWTServiceAsync.INSTANCE.checkCSV(ERRORLIMIT,
|
TDGWTServiceAsync.INSTANCE.checkCSV(ERRORLIMIT,
|
||||||
new AsyncCallback<ArrayList<CSVRowError>>() {
|
new AsyncCallback<CheckCSVSession>() {
|
||||||
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
if (caught instanceof TDGWTSessionExpiredException) {
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
@ -265,10 +266,15 @@ public class CSVConfigCard extends WizardCard {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSuccess(ArrayList<CSVRowError> errors) {
|
public void onSuccess(CheckCSVSession checkCSVSession) {
|
||||||
|
ArrayList<CSVRowError> errors=checkCSVSession.getCsvRowErrorList();
|
||||||
csvCheckPanel.getCheckConfiguration().setEnabled(true);
|
csvCheckPanel.getCheckConfiguration().setEnabled(true);
|
||||||
|
|
||||||
if (errors.size() == 0) {
|
if (errors.size() == 0) {
|
||||||
|
if(checkCSVSession.isCsvFileUpperMaxSizeCheck()){
|
||||||
|
CSVConfigCard.this.csvImportSession
|
||||||
|
.setSkipInvalidLines(true);
|
||||||
|
}
|
||||||
setCheckCorrectMessage();
|
setCheckCorrectMessage();
|
||||||
} else {
|
} else {
|
||||||
setCheckErrorMessage(errors);
|
setCheckErrorMessage(errors);
|
||||||
|
|
Loading…
Reference in New Issue