Fixed Final and Lock error
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@100280 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f9a1f03b6a
commit
a6fb69823a
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||
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;
|
||||
|
@ -117,9 +119,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
retrieveLicencesList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void addTabularResource() {
|
||||
trFieldSet = new FieldSet();
|
||||
trFieldSet.setHeadingText("Tabular Resource");
|
||||
|
@ -180,7 +180,6 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
storeCombo = new ListStore<LicenceData>(propsLicenceData.id());
|
||||
storeCombo.addAll(licencesList);
|
||||
|
||||
|
||||
comboLicences = new ComboBox<LicenceData>(storeCombo,
|
||||
propsLicenceData.licence());
|
||||
comboLicences.setMinListWidth(250);
|
||||
|
@ -292,6 +291,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
UtilsGXT3.alert("Error",
|
||||
"Error retrieving licences.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onSuccess(ArrayList<LicenceData> result) {
|
||||
|
@ -313,7 +313,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
dateField.setValue(tabResource.getDate());
|
||||
typeField.setValue(tabResource.getTrId().getTabularResourceType());
|
||||
rightField.setValue(tabResource.getRight());
|
||||
|
||||
|
||||
validFromField.clear();
|
||||
if (tabResource.getValidFrom() == null
|
||||
|| tabResource.getValidFrom().isEmpty()) {
|
||||
|
@ -329,7 +329,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
validUntilToField.clear();
|
||||
if (tabResource.getValidUntilTo() == null
|
||||
|| tabResource.getValidUntilTo().isEmpty()) {
|
||||
|
@ -452,12 +452,18 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error retrienving properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert(
|
||||
"Error",
|
||||
"Error retrienving properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrienving properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrienving properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -480,11 +486,17 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error retrienving Share Informations: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrienving Share Informations: "
|
||||
+ caught.getLocalizedMessage());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrienving Share Informations: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrienving Share Informations: "
|
||||
+ caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -506,12 +518,17 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error retrienving Last Table: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert(
|
||||
"Error",
|
||||
"Error retrienving Last Table: "
|
||||
+ caught.getLocalizedMessage());
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error retrienving Last Table: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrienving Last Table: "
|
||||
+ caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -581,11 +598,24 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
Log.error("Error Setting Tabular Resoruce Properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error setting tabular resource properties: "
|
||||
if (caught instanceof TDGWTIsLockedException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Locked",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
if (caught instanceof TDGWTIsFinalException) {
|
||||
Log.error(caught.getLocalizedMessage());
|
||||
UtilsGXT3.alert("Error Final",
|
||||
caught.getLocalizedMessage());
|
||||
} else {
|
||||
Log.error("Error Setting Tabular Resoruce Properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
UtilsGXT3
|
||||
.alert("Error",
|
||||
"Error setting tabular resource properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue