bug fixed on searching
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@92217 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
39d116792d
commit
8fe2a21347
|
@ -1034,10 +1034,13 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
case SHARED_FOLDER:
|
case SHARED_FOLDER:
|
||||||
|
|
||||||
WorkspaceSharedFolder shared = (WorkspaceSharedFolder) item;
|
//ATTENTION: SEARCH ITEM IS NOT CASTABLE AT WorkspaceSharedFolder
|
||||||
String name = shared.isVreFolder()?shared.getDisplayName():item.getName();
|
|
||||||
|
// WorkspaceSharedFolder shared = (WorkspaceSharedFolder) item;
|
||||||
|
// String name = shared.isVreFolder()?shared.getDisplayName():item.getName();
|
||||||
|
|
||||||
// fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getCreationDate()), parentFileModel, -1, true, false);
|
// fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getCreationDate()), parentFileModel, -1, true, false);
|
||||||
fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), name, toDate(item.getLastModified()), parentFileModel, -1, true, true,shared.isVreFolder());
|
fileGridModel = (FolderGridModel) new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, true, item.isVreFolder());
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_DOCUMENTS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_DOCUMENTS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
|
@ -1053,14 +1056,14 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO ISSHARED IN SEARCH ITEM IN HL
|
//TODO ISSHARED IN SEARCH ITEM IN HL TO RETRIEVE SHARE ON WORKSPACEITEM
|
||||||
|
|
||||||
//ACCOUNTING
|
//ACCOUNTING
|
||||||
// fileGridModel.setMarkAsRead(item.isMarkedAsRead());
|
// fileGridModel.setMarkAsRead(item.isMarkedAsRead());
|
||||||
|
|
||||||
/*
|
|
||||||
//OWNER
|
//OWNER
|
||||||
if(fileGridModel.isShared()){ //IS READ FROM HL ONLY IF THE ITEM IS SHARED
|
/*if(fileGridModel.isShared()){ //IS READ FROM HL ONLY IF THE ITEM IS SHARED
|
||||||
String portalLogin = item.getOwner();
|
String portalLogin = item.getOwner();
|
||||||
if(portalLogin!=null){
|
if(portalLogin!=null){
|
||||||
String fullName = portalLogin;
|
String fullName = portalLogin;
|
||||||
|
@ -1074,8 +1077,8 @@ public class GWTWorkspaceBuilder {
|
||||||
else{
|
else{
|
||||||
if(userLogged!=null)
|
if(userLogged!=null)
|
||||||
fileGridModel.setOwnerFullName(userLogged.getName());
|
fileGridModel.setOwnerFullName(userLogged.getName());
|
||||||
}
|
}*/
|
||||||
*/
|
|
||||||
|
|
||||||
return fileGridModel;
|
return fileGridModel;
|
||||||
|
|
||||||
|
|
|
@ -360,6 +360,8 @@ public class LocalUploadServlet extends HttpServlet {
|
||||||
if(!isOverwrite){
|
if(!isOverwrite){
|
||||||
//we need to recalculate the item name
|
//we need to recalculate the item name
|
||||||
itemName = WorkspaceUtil.getUniqueName(itemName, destinationFolder);
|
itemName = WorkspaceUtil.getUniqueName(itemName, destinationFolder);
|
||||||
|
logger.trace("before calling createExternalFile - itemName is: "+itemName);
|
||||||
|
logger.trace("before calling createExternalFile - contentType is: "+contentType);
|
||||||
createdItem = WorkspaceUtil.createExternalFile(destinationFolder, itemName, "", contentType, uploadItem);
|
createdItem = WorkspaceUtil.createExternalFile(destinationFolder, itemName, "", contentType, uploadItem);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue