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 736d4fd..05aa83b 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 @@ -11,7 +11,6 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedExcep import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException; import org.gcube.portlets.user.td.gwtservice.shared.licenses.LicenceData; import org.gcube.portlets.user.td.gwtservice.shared.share.Contacts; -import org.gcube.portlets.user.td.gwtservice.shared.share.ShareInfo; import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData; import org.gcube.portlets.user.td.informationwidget.client.custom.IconButton; @@ -396,9 +395,17 @@ public class TabularResourceProperties extends FramedPanel { finalizedField.setReadOnly(false); finalizedField.setValue(false); } - + + ArrayList contacts = tabResource.getContacts(); + if (contacts != null && contacts.size() > 0) { + shareLabel.setVisible(true); + } else { + shareLabel.setVisible(false); + } + } - + + /* protected void updateShareInfo(ShareInfo result) { ArrayList contacts = result.getContacts(); if (contacts != null && contacts.size() > 0) { @@ -406,7 +413,7 @@ public class TabularResourceProperties extends FramedPanel { } else { shareLabel.setVisible(false); } - } + }*/ public void addTable() { tableFieldSet = new FieldSet(); @@ -475,7 +482,8 @@ public class TabularResourceProperties extends FramedPanel { public void onSuccess(TabResource result) { Log.info("Retrived TR: " + result.getTrId()); updateTabularResource(result); - getShareInformation(result.getTrId()); + getLastTable(tabResource.getTrId()); + //getShareInformation(result.getTrId()); } public void onFailure(Throwable caught) { @@ -490,9 +498,9 @@ public class TabularResourceProperties extends FramedPanel { } else { Log.error("Error retrienving properties: " + caught.getLocalizedMessage()); - UtilsGXT3.alert("Error", + /*UtilsGXT3.alert("Error", "Error retrienving properties: " - + caught.getLocalizedMessage()); + + caught.getLocalizedMessage());*/ } } @@ -500,7 +508,8 @@ public class TabularResourceProperties extends FramedPanel { }); } - + + /* protected void getShareInformation(TRId trId) { TDGWTServiceAsync.INSTANCE.getShareInfo(trId, new AsyncCallback() { @@ -532,14 +541,14 @@ public class TabularResourceProperties extends FramedPanel { } }); - } + }*/ protected void getLastTable(TRId trId) { TDGWTServiceAsync.INSTANCE.getLastTable(trId, new AsyncCallback() { public void onSuccess(TableData result) { - Log.debug("Retrived LastTable:" + result); + //Log.debug("Retrieved LastTable:" + result); updateTable(result); }