Fixed interface

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@154692 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2017-09-28 14:57:10 +00:00
parent c2e847b31f
commit 34275ae8b1
1 changed files with 7 additions and 4 deletions

View File

@ -51,7 +51,7 @@ public class DialogPublishOnThredds extends Dialog {
/** /**
* *
*/ */
private int widthDialog = 560; private int widthDialog = 570;
private TextField<String> txtCatalogueName; private TextField<String> txtCatalogueName;
private TriggerField<String> triggerFieldMetadataFolderName; private TriggerField<String> triggerFieldMetadataFolderName;
private ComboBox<GcubeVRE> selectVRE; private ComboBox<GcubeVRE> selectVRE;
@ -154,9 +154,7 @@ public class DialogPublishOnThredds extends Dialog {
@Override @Override
public void handleEvent(BaseEvent be) { public void handleEvent(BaseEvent be) {
showWsExplorer(); showWsExplorer();
} }
}); });
@ -165,6 +163,7 @@ public class DialogPublishOnThredds extends Dialog {
selectVRE.setFieldLabel("Publish in the VRE *"); selectVRE.setFieldLabel("Publish in the VRE *");
selectVRE.setDisplayField("name"); selectVRE.setDisplayField("name");
selectVRE.setStore(vreStore); selectVRE.setStore(vreStore);
selectVRE.setAllowBlank(false);
if(listOfVres==null || listOfVres.isEmpty()) if(listOfVres==null || listOfVres.isEmpty())
loadVresForLoggedUser(); loadVresForLoggedUser();
else else
@ -306,8 +305,12 @@ public class DialogPublishOnThredds extends Dialog {
*/ */
public boolean isValidForm() { public boolean isValidForm() {
if (txtCatalogueName.isValid() && txtCatalogueName.getValue() != null) if (txtCatalogueName.isValid() && txtCatalogueName.getValue() != null && selectVRE.getSelectionLength()>0)
return true; return true;
if(selectVRE.getSelectionLength()==0)
selectVRE.forceInvalid("Required");
return false; return false;
} }