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:
Kevin Roast
2007-05-24 16:03:10 +00:00
parent ef8cf7dda5
commit f5ca49bc83
5 changed files with 179 additions and 26 deletions

View File

@@ -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);
}
}