428: TDM - Support the new Workspace Explorer

Task-Url: https://support.d4science.org/issues/428

Updated support to workspace explorer

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-codelistmapping-import-widget@117648 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-08-04 10:00:57 +00:00
parent a7b3f43ece
commit d56cc3a681
1 changed files with 23 additions and 15 deletions

View File

@ -38,10 +38,12 @@ import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.Verti
public class CodelistMappingWorkSpaceSelectionCard extends WizardCard { public class CodelistMappingWorkSpaceSelectionCard extends WizardCard {
/* /*
public interface HtmlLayoutContainerTemplate extends XTemplates { * public interface HtmlLayoutContainerTemplate extends XTemplates {
@XTemplate("<div class=\"wspaceSelectionCard\" style=\"margin:auto;padding:auto;\"></div>") *
SafeHtml getTemplate(); * @XTemplate(
}*/ * "<div class=\"wspaceSelectionCard\" style=\"margin:auto;padding:auto;\"></div>"
* ) SafeHtml getTemplate(); }
*/
private CodelistMappingSession codelistMappingSession; private CodelistMappingSession codelistMappingSession;
private CodelistMappingWorkSpaceSelectionCard thisCard; private CodelistMappingWorkSpaceSelectionCard thisCard;
@ -56,13 +58,14 @@ public class CodelistMappingWorkSpaceSelectionCard extends WizardCard {
this.codelistMappingSession = codelistMappingSession; this.codelistMappingSession = codelistMappingSession;
thisCard = this; thisCard = this;
/*
/*HtmlLayoutContainerTemplate templates = GWT * HtmlLayoutContainerTemplate templates = GWT
.create(HtmlLayoutContainerTemplate.class); * .create(HtmlLayoutContainerTemplate.class);
*
HtmlLayoutContainer htmlLayoutContainer = new HtmlLayoutContainer( * HtmlLayoutContainer htmlLayoutContainer = new HtmlLayoutContainer(
templates.getTemplate()); * templates.getTemplate()); htmlLayoutContainer.add(button1, new
htmlLayoutContainer.add(button1, new HtmlData(".wspaceSelectionCard"));*/ * HtmlData(".wspaceSelectionCard"));
*/
p = new VerticalLayoutContainer(); p = new VerticalLayoutContainer();
@ -82,7 +85,7 @@ public class CodelistMappingWorkSpaceSelectionCard extends WizardCard {
allowedFileExtensions, new HashMap<String, String>()); allowedFileExtensions, new HashMap<String, String>());
wpanel = new WorkspaceExplorerSelectPanel(new String( wpanel = new WorkspaceExplorerSelectPanel(new String(
"Workspace Selection"), filterCriteria); "Workspace Selection"), filterCriteria, selectableTypes);
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() { WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
@ -122,13 +125,18 @@ public class CodelistMappingWorkSpaceSelectionCard extends WizardCard {
Log.debug("WorkspaceExplorer Aborted"); Log.debug("WorkspaceExplorer Aborted");
} }
@Override
public void onNotValidSelection() {
codelistMappingSession.setItemId(null);
getWizardWindow().setEnableNextButton(false);
}
}; };
wpanel.addWorkspaceExplorerSelectNotificationListener(handler); wpanel.addWorkspaceExplorerSelectNotificationListener(handler);
p.add(wpanel, new VerticalLayoutData(1, 1, new Margins(0))); p.add(wpanel, new VerticalLayoutData(1, 1, new Margins(0, 0, 0, 44)));
setContent(p); setContent(p);