From e810709686fd17d68107a8c55be57d62c3d48fb8 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 3 Nov 2014 17:12:18 +0000 Subject: [PATCH] Minor update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@101389 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/TabularResourceProperties.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java index e9e8755..af66c74 100644 --- a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java +++ b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java @@ -403,9 +403,11 @@ public class TabularResourceProperties extends FramedPanel { if (tabResource.isFinalized()) { finalizedField.setReadOnly(true); finalizedField.setValue(true); + saveButton.setEnabled(false); } else { finalizedField.setReadOnly(false); finalizedField.setValue(false); + saveButton.setEnabled(true); } ArrayList contacts = tabResource.getContacts(); @@ -632,7 +634,13 @@ public class TabularResourceProperties extends FramedPanel { } } - + + if(vFrom!=null && vUntilTo!=null && vFrom.compareTo(vUntilTo)>0){ + Log.debug("Attention Valid From field is higher than Valid Until To field"); + UtilsGXT3.info("Attention", "Valid From field is higher than Valid Until To field"); + return; + } + if (comboLicences.getCurrentValue() != null && comboLicences.getCurrentValue().getLicence() != null && !comboLicences.getCurrentValue().getLicence().isEmpty()) { @@ -680,6 +688,11 @@ public class TabularResourceProperties extends FramedPanel { if (finalizedField.getValue()) { finalizedField.setReadOnly(true); finalizedField.setValue(true); + saveButton.setEnabled(false); + } else { + finalizedField.setReadOnly(false); + finalizedField.setValue(false); + saveButton.setEnabled(true); } DataViewRequestEvent dataViewRequestEvent=new DataViewRequestEvent(); TabularResourceDataView tabularResouceDataView=new TabularResourceDataView(tabResource.getTrId(),tabResource.getName());