Delete space/document action added to MySpaces portlet.

Fixed subtle issue with ajax request being processed before outer txn was completed - caused refresh issues after Create/Upload/Delete actions.
More ui improvements to MySpaces portlet.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5799 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-05-29 13:57:41 +00:00
parent a3774b123d
commit a484e6737f
6 changed files with 74 additions and 23 deletions

View File

@@ -197,7 +197,6 @@ public class FileUploadBean
ResponseWriter out = fc.getResponseWriter();
XMLUtil.print(result, out);
out.close();
}
static NodeRef pathToNodeRef(FacesContext fc, String path)

View File

@@ -105,6 +105,27 @@ public class MySpacesBean
{
out.write("ERROR: " + err.getMessage());
}
out.close();
}
@InvokeCommand.ResponseMimetype(value=MimetypeMap.MIMETYPE_HTML)
public void deleteItem() throws Exception
{
FacesContext fc = FacesContext.getCurrentInstance();
ResponseWriter out = fc.getResponseWriter();
Map<String, String> requestMap = fc.getExternalContext().getRequestParameterMap();
String strNodeRef = (String)requestMap.get("noderef");
if (strNodeRef != null && strNodeRef.length() != 0)
{
try
{
Repository.getServiceRegistry(fc).getFileFolderService().delete(new NodeRef(strNodeRef));
out.write("OK: " + strNodeRef);
}
catch (Throwable err)
{
out.write("ERROR: " + err.getMessage());
}
}
}
}

View File

@@ -180,7 +180,6 @@ public class FilePickerBean
final ResponseWriter out = facesContext.getResponseWriter();
XMLUtil.print(result, out);
out.close();
}
@InvokeCommand.ResponseMimetype(value=MimetypeMap.MIMETYPE_HTML)
@@ -272,7 +271,6 @@ public class FilePickerBean
final ResponseWriter out = facesContext.getResponseWriter();
XMLUtil.print(result, out);
out.close();
}
private String getCurrentAVMPath()