diff --git a/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/CSVConfigCard.java b/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/CSVConfigCard.java index dcb100c..7711f9e 100644 --- a/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/CSVConfigCard.java +++ b/src/main/java/org/gcube/portlets/user/td/csvimportwidget/client/CSVConfigCard.java @@ -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.CSVImportSession; 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.file.HeaderPresence; @@ -247,7 +248,7 @@ public class CSVConfigCard extends WizardCard { csvCheckPanel.getCheckConfiguration().setEnabled(false); TDGWTServiceAsync.INSTANCE.checkCSV(ERRORLIMIT, - new AsyncCallback>() { + new AsyncCallback() { public void onFailure(Throwable caught) { if (caught instanceof TDGWTSessionExpiredException) { @@ -265,10 +266,15 @@ public class CSVConfigCard extends WizardCard { } } - public void onSuccess(ArrayList errors) { + public void onSuccess(CheckCSVSession checkCSVSession) { + ArrayList errors=checkCSVSession.getCsvRowErrorList(); csvCheckPanel.getCheckConfiguration().setEnabled(true); if (errors.size() == 0) { + if(checkCSVSession.isCsvFileUpperMaxSizeCheck()){ + CSVConfigCard.this.csvImportSession + .setSkipInvalidLines(true); + } setCheckCorrectMessage(); } else { setCheckErrorMessage(errors);