From 38678527cbe1a5511719435d11ee74bc5b4c0a6b Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 25 Jul 2014 10:35:08 +0000 Subject: [PATCH] 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 --- .../user/td/csvimportwidget/client/CSVConfigCard.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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);