From 1f51d4fe21fa073c5171f475730eb8c076ce6192 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 23 May 2014 09:50:26 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@96013 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/TabularResourceProperties.java | 18 +++++++++++++++++- 1 file changed, 17 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 8b1a575..b64e2e4 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 @@ -33,6 +33,7 @@ import com.sencha.gxt.widget.core.client.event.HideEvent; import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler; import com.sencha.gxt.widget.core.client.event.SelectEvent; import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; +import com.sencha.gxt.widget.core.client.form.CheckBox; import com.sencha.gxt.widget.core.client.form.FieldLabel; import com.sencha.gxt.widget.core.client.form.FieldSet; import com.sencha.gxt.widget.core.client.form.TextArea; @@ -54,6 +55,7 @@ public class TabularResourceProperties extends FramedPanel { protected TextField agencyField; protected TextField dateField; protected TextArea rightField; + protected CheckBox finalizedField; protected TextField typeField; protected TRMetadataAccordionPanel trMetadataPanel; @@ -125,6 +127,12 @@ public class TabularResourceProperties extends FramedPanel { layoutTabularResource.add(new FieldLabel(rightField, "Rights"), new VerticalLayoutData(1, -1)); + finalizedField = new CheckBox(); + //finalizedField.setBoxLabel(""); + finalizedField.setValue(false); + layoutTabularResource.add(new FieldLabel(finalizedField, "Finalized"), + new VerticalLayoutData(1, -1)); + // Save Button saveButton = new TextButton("Save"); saveButton.setIcon(ResourceBundle.INSTANCE.save()); @@ -174,6 +182,13 @@ public class TabularResourceProperties extends FramedPanel { dateField.setValue(tabResource.getDate()); typeField.setValue(tabResource.getTrId().getTabularResourceType()); rightField.setValue(tabResource.getRight()); + if(tabResource.isFinalized()){ + finalizedField.setEnabled(false); + finalizedField.setValue(true); + } else { + finalizedField.setEnabled(true); + finalizedField.setValue(false); + } } @@ -315,7 +330,8 @@ public class TabularResourceProperties extends FramedPanel { tabResource.setDescription(descriptionField.getValue()); tabResource.setAgency(agencyField.getValue()); tabResource.setRight(rightField.getValue()); - + tabResource.setFinalized(finalizedField.getValue()); + TDGWTServiceAsync.INSTANCE.setTabResourceInformation(tabResource, new AsyncCallback() {