Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@92909 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5813edcb0f
commit
14e0a7e90e
|
@ -78,19 +78,19 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
trFieldSet.add(layoutTabularResource);
|
||||
|
||||
nameField = new TextField();
|
||||
nameField.setReadOnly(true);
|
||||
//nameField.setReadOnly(true);
|
||||
nameField.setValue("");
|
||||
layoutTabularResource.add(new FieldLabel(nameField, "Name"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
|
||||
descriptionField = new TextArea();
|
||||
descriptionField.setReadOnly(true);
|
||||
//descriptionField.setReadOnly(true);
|
||||
descriptionField.setValue("");
|
||||
layoutTabularResource.add(new FieldLabel(descriptionField,
|
||||
"Description"), new VerticalLayoutData(1, -1));
|
||||
|
||||
agencyField = new TextField();
|
||||
agencyField.setReadOnly(true);
|
||||
//agencyField.setReadOnly(true);
|
||||
agencyField.setValue("");
|
||||
layoutTabularResource.add(new FieldLabel(agencyField, "Agency"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
|
@ -102,7 +102,7 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
new VerticalLayoutData(1, -1));
|
||||
|
||||
rightField = new TextArea();
|
||||
rightField.setReadOnly(true);
|
||||
//rightField.setReadOnly(true);
|
||||
rightField.setValue("");
|
||||
layoutTabularResource.add(new FieldLabel(rightField, "Rights"),
|
||||
new VerticalLayoutData(1, -1));
|
||||
|
@ -234,29 +234,49 @@ public class TabularResourceProperties extends FramedPanel {
|
|||
|
||||
|
||||
protected void onSave(){
|
||||
if(nameField.getValue()==null || nameField.getValue().isEmpty() ){
|
||||
alert("Attention","Fill name field");
|
||||
return;
|
||||
}
|
||||
|
||||
if(descriptionField.getValue()==null || descriptionField.getValue().isEmpty() ){
|
||||
alert("Attention","Fill description field");
|
||||
return;
|
||||
}
|
||||
|
||||
if(rightField.getValue()==null || rightField.getValue().isEmpty() ){
|
||||
alert("Attention","Fill rights field");
|
||||
return;
|
||||
}
|
||||
|
||||
tabResource.setName(nameField.getValue());
|
||||
tabResource.setDescription(descriptionField.getValue());
|
||||
tabResource.setAgency(agencyField.getValue());
|
||||
tabResource.setRight(rightField.getValue());
|
||||
|
||||
|
||||
|
||||
/*TDGWTServiceAsync.INSTANCE.setTabResourceInfo(tabResource,
|
||||
TDGWTServiceAsync.INSTANCE.setTabResourceInformation(tabResource,
|
||||
new AsyncCallback<Void>() {
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
Log.debug("Share Error: "
|
||||
Log.debug("Error Setting Tabular Resoruce Properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
alert("Error sharing tabular resource",
|
||||
"Error shareing tabular resource");
|
||||
alert("Error",
|
||||
"Error setting tabular resource properties");
|
||||
|
||||
}
|
||||
|
||||
public void onSuccess(Void result) {
|
||||
Log.debug("Tabular Resource Shared: "
|
||||
+ shareInfo.getTabResource().getTrId()
|
||||
.toString());
|
||||
info("Shared",
|
||||
"Tabular Resource is shared");
|
||||
Log.debug("Tabular Resource properties are set: "
|
||||
+ tabResource);
|
||||
info("Proprerties",
|
||||
"Tabular Resource properties are set");
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
private void alert(String title, String message) {
|
||||
|
|
Loading…
Reference in New Issue