VRE folder changed

fixed breadcrumb name for VRE folder

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@91560 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2014-02-13 17:40:59 +00:00
parent 5172556090
commit 2cd7f839b7
4 changed files with 23 additions and 9 deletions

View File

@ -1449,8 +1449,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
@Override
public void onFailure(Throwable caught) {
explorerPanel.getAsycTreePanel().unmask();
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR +" adding item. " + ConstantsExplorer.TRY_AGAIN, null);
// explorerPanel.getAsycTreePanel().removeAllAndRecoveryRoot();
new MessageBoxAlert("Error", caught.getMessage(), null);
}
@Override
@ -1470,8 +1469,7 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
@Override
public void onFailure(Throwable caught) {
explorerPanel.getAsycTreePanel().unmask();
new MessageBoxAlert("Error", ConstantsExplorer.SERVER_ERROR + " creating folder." + ConstantsExplorer.TRY_AGAIN, null);
// explorerPanel.getAsycTreePanel().removeAllAndRecoveryRoot();
new MessageBoxAlert("Error", caught.getMessage(), null);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 430 B

View File

@ -1427,7 +1427,15 @@ public class GWTWorkspaceBuilder {
*/
public FolderModel buildGXTFolderModelItem(WorkspaceFolder wsFolder, FileModel parent) throws InternalErrorException {
FolderModel folder = new FolderModel(wsFolder.getId(),wsFolder.getName(), parent, true, wsFolder.isShared(), false);
String name = "";
if(wsFolder.isShared()){
WorkspaceSharedFolder shared = (WorkspaceSharedFolder) wsFolder;
name = shared.isVreFolder()?shared.getDisplayName():wsFolder.getName();
}else
name = wsFolder.getName();
FolderModel folder = new FolderModel(wsFolder.getId(), name, parent, true, wsFolder.isShared(), false);
folder.setShareable(true);
folder.setDescription(wsFolder.getDescription());
// folder.setOwner(wsFolder.getOwner());

View File

@ -45,7 +45,6 @@ import org.gcube.portlets.user.workspace.client.model.MessageModel;
import org.gcube.portlets.user.workspace.client.model.ScopeModel;
import org.gcube.portlets.user.workspace.client.model.SmartFolderModel;
import org.gcube.portlets.user.workspace.client.model.SubTree;
import org.gcube.portlets.user.workspace.client.resources.Resources;
import org.gcube.portlets.user.workspace.client.rpc.GWTWorkspaceService;
import org.gcube.portlets.user.workspace.client.workspace.GWTWorkspaceItem;
import org.gcube.portlets.user.workspace.server.notifications.NotificationsProducer;
@ -774,7 +773,7 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
return true;
} catch (InsufficientPrivilegesException e) {
String error = "An error occurred on renaming item, " +e.getMessage();
String error = "Insufficient Privileges to rename the item";
workspaceLogger.error(error, e);
throw new Exception(error);
} catch (ItemAlreadyExistException e) {
@ -814,9 +813,18 @@ public class GWTWorkspaceServiceImpl extends RemoteServiceServlet implements GWT
return builder.buildGXTFolderModelItem(wsFolder, parent);
} catch(InsufficientPrivilegesException e){
String error = "Insufficient Privileges to create the folder";
workspaceLogger.error(error, e);
throw new Exception(error);
} catch (ItemAlreadyExistException e) {
String error = "An error occurred on creating folder, " +e.getMessage();
workspaceLogger.error(error, e);
throw new Exception(error);
} catch (Exception e) {
workspaceLogger.error("Error in server create folder", e);
throw new Exception(e.getMessage());
String error = ConstantsExplorer.SERVER_ERROR + " creating folder. "+ConstantsExplorer.TRY_AGAIN;
workspaceLogger.error(error, e);
throw new Exception(error);
}
}