219: Workspace: modify the WorkspaceItem properties
Task-Url: https://support.d4science.org/issues/219 Updated DialogEditProperties git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@115346 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
abfab247c4
commit
2e1902d8d3
|
@ -63,14 +63,12 @@ public class DialogEditProperties extends Dialog{
|
|||
setScrollMode(Scroll.AUTOY);
|
||||
setResizable(false);
|
||||
setButtons(Dialog.OK);
|
||||
|
||||
getButtonById(Dialog.OK).setText("Save");
|
||||
|
||||
getButtonById(Dialog.OK).addListener(Events.Select, new Listener<BaseEvent>() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(BaseEvent be) {
|
||||
saveProperties();
|
||||
saveProperties(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -96,7 +94,7 @@ public class DialogEditProperties extends Dialog{
|
|||
removeAll();
|
||||
}
|
||||
|
||||
private void saveProperties(){
|
||||
private void saveProperties(final boolean closeOnSuccess){
|
||||
Map<String,String> prp = new HashMap<String, String>(fields.size());
|
||||
for (TextField<String> field : fields) {
|
||||
prp.put(field.getFieldLabel(), field.getValue());
|
||||
|
@ -112,6 +110,8 @@ public class DialogEditProperties extends Dialog{
|
|||
@Override
|
||||
public void onSuccess(Void result) {
|
||||
commad.execute();
|
||||
if(closeOnSuccess)
|
||||
DialogEditProperties.this.hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue