mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
RM-541 (Error shown in firebug when the details page of a record is open)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0-BUG-FIX@43623 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,35 +1,40 @@
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
{
|
||||
"data":
|
||||
{
|
||||
"url": "${nextaction.url}",
|
||||
"name": "${nextaction.name}",
|
||||
"label": "${nextaction.label}",
|
||||
"eventsEligible": ${nextaction.eventsEligible?string},
|
||||
<#if nextaction.asOf??>"asOf": "${nextaction.asOf}",</#if>
|
||||
<#if nextaction.startedAt??>"startedAt": "${nextaction.startedAt}",</#if>
|
||||
<#if nextaction.startedBy??>"startedBy": "${nextaction.startedBy}",</#if>
|
||||
<#if nextaction.startedByFirstName??>"startedByFirstName": "${nextaction.startedByFirstName}",</#if>
|
||||
<#if nextaction.startedByLastName??>"startedByLastName": "${nextaction.startedByLastName}",</#if>
|
||||
<#if nextaction.completedAt??>"completedAt": "${nextaction.completedAt}",</#if>
|
||||
<#if nextaction.completedBy??>"completedBy": "${nextaction.completedBy}",</#if>
|
||||
<#if nextaction.completedByFirstName??>"completedByFirstName": "${nextaction.completedByFirstName}",</#if>
|
||||
<#if nextaction.completedByLastName??>"completedByLastName": "${nextaction.completedByLastName}",</#if>
|
||||
"events":
|
||||
[
|
||||
<#list nextaction.events as event>
|
||||
{
|
||||
"name": "${event.name}",
|
||||
"label": "${event.label}",
|
||||
"complete": ${event.complete?string},
|
||||
<#if event.completedAt??>"completedAt": "${event.completedAt}",</#if>
|
||||
<#if event.completedBy??>"completedBy": "${event.completedBy}",</#if>
|
||||
<#if event.completedByFirstName??>"completedByFirstName": "${event.completedByFirstName}",</#if>
|
||||
<#if event.completedByLastName??>"completedByLastName": "${event.completedByLastName}",</#if>
|
||||
"automatic": ${event.automatic?string}
|
||||
}<#if event_has_next>,</#if>
|
||||
</#list>
|
||||
]
|
||||
}
|
||||
"data":
|
||||
{
|
||||
<#if nextaction.notFound?? && nextaction.notFound>
|
||||
"notFound": ${nextaction.notFound?string},
|
||||
"message": "${nextaction.message}"
|
||||
<#else>
|
||||
"url": "${nextaction.url}",
|
||||
"name": "${nextaction.name}",
|
||||
"label": "${nextaction.label}",
|
||||
"eventsEligible": ${nextaction.eventsEligible?string},
|
||||
<#if nextaction.asOf??>"asOf": "${nextaction.asOf}",</#if>
|
||||
<#if nextaction.startedAt??>"startedAt": "${nextaction.startedAt}",</#if>
|
||||
<#if nextaction.startedBy??>"startedBy": "${nextaction.startedBy}",</#if>
|
||||
<#if nextaction.startedByFirstName??>"startedByFirstName": "${nextaction.startedByFirstName}",</#if>
|
||||
<#if nextaction.startedByLastName??>"startedByLastName": "${nextaction.startedByLastName}",</#if>
|
||||
<#if nextaction.completedAt??>"completedAt": "${nextaction.completedAt}",</#if>
|
||||
<#if nextaction.completedBy??>"completedBy": "${nextaction.completedBy}",</#if>
|
||||
<#if nextaction.completedByFirstName??>"completedByFirstName": "${nextaction.completedByFirstName}",</#if>
|
||||
<#if nextaction.completedByLastName??>"completedByLastName": "${nextaction.completedByLastName}",</#if>
|
||||
"events":
|
||||
[
|
||||
<#list nextaction.events as event>
|
||||
{
|
||||
"name": "${event.name}",
|
||||
"label": "${event.label}",
|
||||
"complete": ${event.complete?string},
|
||||
<#if event.completedAt??>"completedAt": "${event.completedAt}",</#if>
|
||||
<#if event.completedBy??>"completedBy": "${event.completedBy}",</#if>
|
||||
<#if event.completedByFirstName??>"completedByFirstName": "${event.completedByFirstName}",</#if>
|
||||
<#if event.completedByLastName??>"completedByLastName": "${event.completedByLastName}",</#if>
|
||||
"automatic": ${event.automatic?string}
|
||||
}<#if event_has_next>,</#if>
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
}
|
||||
}
|
||||
</#escape>
|
@@ -23,8 +23,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||
import org.alfresco.module.org_alfresco_module_rm.event.EventCompletionDetails;
|
||||
@@ -68,9 +66,12 @@ public class DispositionLifecycleGet extends DispositionAbstractBase
|
||||
DispositionAction nextAction = this.dispositionService.getNextDispositionAction(nodeRef);
|
||||
if (nextAction == null)
|
||||
{
|
||||
status.setCode(HttpServletResponse.SC_NOT_FOUND,
|
||||
"Node " + nodeRef.toString() + " does not have a disposition lifecycle");
|
||||
return null;
|
||||
Map<String, Object> nextActionModel = new HashMap<String, Object>(2);
|
||||
nextActionModel.put("notFound", true);
|
||||
nextActionModel.put("message", "Node " + nodeRef.toString() + " does not have a disposition lifecycle");
|
||||
Map<String, Object> model = new HashMap<String, Object>(1);
|
||||
model.put("nextaction", nextActionModel);
|
||||
return model;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user