From 5d62cd263c172050034aa567d1f89664c59317f4 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 15 Jun 2015 16:27:31 +0000 Subject: [PATCH] 209: TDM - Show the resources through a ListView widget Task-Url: https://support.d4science.org/issues/209 Updated name of resources support git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-resources-widget@115403 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/save/WorkSpaceSelectionCard.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/save/WorkSpaceSelectionCard.java b/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/save/WorkSpaceSelectionCard.java index 0d496a7..25b2b74 100644 --- a/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/save/WorkSpaceSelectionCard.java +++ b/src/main/java/org/gcube/portlets/user/td/resourceswidget/client/save/WorkSpaceSelectionCard.java @@ -8,7 +8,6 @@ import java.util.List; import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.SaveResourceSession; import org.gcube.portlets.user.td.resourceswidget.client.workspace.WorkspacePanel; -import org.gcube.portlets.user.td.widgetcommonevent.shared.mime.MimeTypeSupport; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; import org.gcube.portlets.widgets.lighttree.client.Item; import org.gcube.portlets.widgets.lighttree.client.ItemType; @@ -25,6 +24,7 @@ import com.sencha.gxt.widget.core.client.event.HideEvent; import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler; import com.sencha.gxt.widget.core.client.form.FieldLabel; import com.sencha.gxt.widget.core.client.form.TextField; +import com.sencha.gxt.widget.core.client.form.validator.EmptyValidator; /** * @@ -56,24 +56,20 @@ public class WorkSpaceSelectionCard extends WizardCard { fileName = new TextField(); fileName.setAllowBlank(false); + fileName.addValidator(new EmptyValidator()); fileName.setWidth("410px"); + fileName.setValue(saveResourceSession.getFileName()); - MimeTypeSupport mime=saveResourceSession.getMime(); - if(mime==null|| mime.compareTo(MimeTypeSupport._unknow)==0){ - fileName.setValue(saveResourceSession.getFileName()); - } else { - fileName.setValue(saveResourceSession.getFileName()+ - mime.getExtension()); - } - p.add(new FieldLabel(fileName, "File Name"), new VerticalLayoutData(-1, + p.add(new FieldLabel(fileName, "Name"), new VerticalLayoutData(-1, -1)); fileDescription = new TextField(); fileDescription.setAllowBlank(false); + fileDescription.addValidator(new EmptyValidator()); fileDescription.setWidth("410px"); fileDescription.setValue(saveResourceSession.getFileDescription()); - p.add(new FieldLabel(fileDescription, "File Description"), + p.add(new FieldLabel(fileDescription, "Description"), new VerticalLayoutData(-1, -1)); Log.debug("Set Workspace Panel");