ref 16157: Select button does not seem to work in SAI - Select a Resource window
https://support.d4science.org/issues/16157 Created a workaround to fix WorkspaceExplorer files support git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@177309 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
043e0cfc66
commit
0a2ee31c72
|
@ -1,12 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="target/statistical-algorithms-importer-1.13.1-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
<classpathentry kind="src" output="target/statistical-algorithms-importer-1.13.2-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/statistical-algorithms-importer-1.13.1-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
<classpathentry excluding="**" kind="src" output="target/statistical-algorithms-importer-1.13.2-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -45,5 +45,5 @@
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
||||||
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
<classpathentry kind="lib" path="/home/giancarlo/gwt/gwt-2.6.1/validation-api-1.0.0.GA-sources.jar"/>
|
||||||
<classpathentry kind="output" path="target/statistical-algorithms-importer-1.13.1-SNAPSHOT/WEB-INF/classes"/>
|
<classpathentry kind="output" path="target/statistical-algorithms-importer-1.13.2-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
|
<Changeset component="${groupId}.${artifactId}.1-13-2" date="2019-02-26">
|
||||||
|
<Change>Updated resource selection how workaround for
|
||||||
|
WorkspaceExplorer widget [ticket #16157]
|
||||||
|
</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="${groupId}.${artifactId}.1-13-1" date="2018-12-06">
|
<Changeset component="${groupId}.${artifactId}.1-13-1" date="2018-12-06">
|
||||||
<Change>Added the project folder path update in the open operation
|
<Change>Added the project folder path update in the open operation
|
||||||
[ticket #12977]
|
[ticket #12977]
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>statistical-algorithms-importer</artifactId>
|
<artifactId>statistical-algorithms-importer</artifactId>
|
||||||
<version>1.13.1-SNAPSHOT</version>
|
<version>1.13.2-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -206,30 +206,30 @@ public class ProjectManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addResource() {
|
public void addResource() {
|
||||||
List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
/*
|
||||||
selectableTypes.add(ItemType.EXTERNAL_FILE);
|
* List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
||||||
|
* selectableTypes.add(ItemType.EXTERNAL_FILE);
|
||||||
|
*
|
||||||
|
* List<ItemType> showableTypes = new ArrayList<ItemType>();
|
||||||
|
* showableTypes.addAll(Arrays.asList(ItemType.values()));
|
||||||
|
*/
|
||||||
|
|
||||||
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
WorkspaceExplorerSelectDialog wselectDialog = new WorkspaceExplorerSelectDialog("Select a file resource", false);
|
||||||
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
|
||||||
|
|
||||||
WorkspaceExplorerSelectDialog wselectDialog = new WorkspaceExplorerSelectDialog("Select a Resource",
|
|
||||||
selectableTypes, showableTypes);
|
|
||||||
|
|
||||||
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelectedItem(Item item) {
|
public void onSelectedItem(Item item) {
|
||||||
if (item.getType() != ItemType.FOLDER && item.getType() != ItemType.PRIVATE_FOLDER
|
if (item == null || item.getType() == ItemType.FOLDER || item.getType() == ItemType.PRIVATE_FOLDER
|
||||||
&& item.getType() != ItemType.SHARED_FOLDER && item.getType() != ItemType.VRE_FOLDER) {
|
|| item.getType() == ItemType.SHARED_FOLDER || item.getType() == ItemType.VRE_FOLDER) {
|
||||||
|
UtilsGXT3.info("Attention", "Select a valid file resource!");
|
||||||
|
} else {
|
||||||
String filename = item.getName();
|
String filename = item.getName();
|
||||||
if (filename != null && !filename.isEmpty()) {
|
if (filename != null && !filename.isEmpty()) {
|
||||||
addResourceToProject(item);
|
addResourceToProject(item);
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.info("Attention", "Select a valid resource!");
|
UtilsGXT3.info("Attention", "Select a valid file resource!");
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
UtilsGXT3.info("Attention", "Select a valid resource!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -393,7 +393,7 @@ public class ProjectManager {
|
||||||
Log.error("Session Expired");
|
Log.error("Session Expired");
|
||||||
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
|
||||||
} else {
|
} else {
|
||||||
Log.error("Error in create software: " + caught.getLocalizedMessage(),caught);
|
Log.error("Error in create software: " + caught.getLocalizedMessage(), caught);
|
||||||
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
|
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
|
||||||
fireProjectStatusExplorerRefreshEvent();
|
fireProjectStatusExplorerRefreshEvent();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue