Create Multi Tab Management

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@100721 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-10-15 16:45:14 +00:00
parent dd986d75c7
commit 6837e80549
1 changed files with 19 additions and 10 deletions

View File

@ -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> contacts = tabResource.getContacts();
if (contacts != null && contacts.size() > 0) {
shareLabel.setVisible(true);
} else {
shareLabel.setVisible(false);
}
}
/*
protected void updateShareInfo(ShareInfo result) {
ArrayList<Contacts> 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<ShareInfo>() {
@ -532,14 +541,14 @@ public class TabularResourceProperties extends FramedPanel {
}
});
}
}*/
protected void getLastTable(TRId trId) {
TDGWTServiceAsync.INSTANCE.getLastTable(trId,
new AsyncCallback<TableData>() {
public void onSuccess(TableData result) {
Log.debug("Retrived LastTable:" + result);
//Log.debug("Retrieved LastTable:" + result);
updateTable(result);
}