mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user