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