mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Create Space action implemented in the MySpaces portlet. Other portlet UI improvement and fixes.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5776 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -122,17 +122,7 @@ public class FileUploadBean
|
||||
{
|
||||
if (file != null && currentPath != null && currentPath.length() != 0)
|
||||
{
|
||||
// convert cm:name based path to a NodeRef
|
||||
StringTokenizer t = new StringTokenizer(currentPath, "/");
|
||||
int tokenCount = t.countTokens();
|
||||
String[] elements = new String[tokenCount];
|
||||
for (int i=0; i<tokenCount; i++)
|
||||
{
|
||||
elements[i] = t.nextToken();
|
||||
}
|
||||
|
||||
NodeRef containerRef = BaseServlet.resolveWebDAVPath(fc, elements, false);
|
||||
|
||||
NodeRef containerRef = pathToNodeRef(fc, currentPath);
|
||||
if (containerRef != null)
|
||||
{
|
||||
// Try and extract metadata from the file
|
||||
@@ -209,4 +199,17 @@ public class FileUploadBean
|
||||
XMLUtil.print(result, out);
|
||||
out.close();
|
||||
}
|
||||
|
||||
static NodeRef pathToNodeRef(FacesContext fc, String path)
|
||||
{
|
||||
// convert cm:name based path to a NodeRef
|
||||
StringTokenizer t = new StringTokenizer(path, "/");
|
||||
int tokenCount = t.countTokens();
|
||||
String[] elements = new String[tokenCount];
|
||||
for (int i=0; i<tokenCount; i++)
|
||||
{
|
||||
elements[i] = t.nextToken();
|
||||
}
|
||||
return BaseServlet.resolveWebDAVPath(fc, elements, false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user