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)>
|
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||||
{
|
{
|
||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"url": "${nextaction.url}",
|
<#if nextaction.notFound?? && nextaction.notFound>
|
||||||
"name": "${nextaction.name}",
|
"notFound": ${nextaction.notFound?string},
|
||||||
"label": "${nextaction.label}",
|
"message": "${nextaction.message}"
|
||||||
"eventsEligible": ${nextaction.eventsEligible?string},
|
<#else>
|
||||||
<#if nextaction.asOf??>"asOf": "${nextaction.asOf}",</#if>
|
"url": "${nextaction.url}",
|
||||||
<#if nextaction.startedAt??>"startedAt": "${nextaction.startedAt}",</#if>
|
"name": "${nextaction.name}",
|
||||||
<#if nextaction.startedBy??>"startedBy": "${nextaction.startedBy}",</#if>
|
"label": "${nextaction.label}",
|
||||||
<#if nextaction.startedByFirstName??>"startedByFirstName": "${nextaction.startedByFirstName}",</#if>
|
"eventsEligible": ${nextaction.eventsEligible?string},
|
||||||
<#if nextaction.startedByLastName??>"startedByLastName": "${nextaction.startedByLastName}",</#if>
|
<#if nextaction.asOf??>"asOf": "${nextaction.asOf}",</#if>
|
||||||
<#if nextaction.completedAt??>"completedAt": "${nextaction.completedAt}",</#if>
|
<#if nextaction.startedAt??>"startedAt": "${nextaction.startedAt}",</#if>
|
||||||
<#if nextaction.completedBy??>"completedBy": "${nextaction.completedBy}",</#if>
|
<#if nextaction.startedBy??>"startedBy": "${nextaction.startedBy}",</#if>
|
||||||
<#if nextaction.completedByFirstName??>"completedByFirstName": "${nextaction.completedByFirstName}",</#if>
|
<#if nextaction.startedByFirstName??>"startedByFirstName": "${nextaction.startedByFirstName}",</#if>
|
||||||
<#if nextaction.completedByLastName??>"completedByLastName": "${nextaction.completedByLastName}",</#if>
|
<#if nextaction.startedByLastName??>"startedByLastName": "${nextaction.startedByLastName}",</#if>
|
||||||
"events":
|
<#if nextaction.completedAt??>"completedAt": "${nextaction.completedAt}",</#if>
|
||||||
[
|
<#if nextaction.completedBy??>"completedBy": "${nextaction.completedBy}",</#if>
|
||||||
<#list nextaction.events as event>
|
<#if nextaction.completedByFirstName??>"completedByFirstName": "${nextaction.completedByFirstName}",</#if>
|
||||||
{
|
<#if nextaction.completedByLastName??>"completedByLastName": "${nextaction.completedByLastName}",</#if>
|
||||||
"name": "${event.name}",
|
"events":
|
||||||
"label": "${event.label}",
|
[
|
||||||
"complete": ${event.complete?string},
|
<#list nextaction.events as event>
|
||||||
<#if event.completedAt??>"completedAt": "${event.completedAt}",</#if>
|
{
|
||||||
<#if event.completedBy??>"completedBy": "${event.completedBy}",</#if>
|
"name": "${event.name}",
|
||||||
<#if event.completedByFirstName??>"completedByFirstName": "${event.completedByFirstName}",</#if>
|
"label": "${event.label}",
|
||||||
<#if event.completedByLastName??>"completedByLastName": "${event.completedByLastName}",</#if>
|
"complete": ${event.complete?string},
|
||||||
"automatic": ${event.automatic?string}
|
<#if event.completedAt??>"completedAt": "${event.completedAt}",</#if>
|
||||||
}<#if event_has_next>,</#if>
|
<#if event.completedBy??>"completedBy": "${event.completedBy}",</#if>
|
||||||
</#list>
|
<#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>
|
</#escape>
|
@@ -23,8 +23,6 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.event.EventCompletionDetails;
|
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);
|
DispositionAction nextAction = this.dispositionService.getNextDispositionAction(nodeRef);
|
||||||
if (nextAction == null)
|
if (nextAction == null)
|
||||||
{
|
{
|
||||||
status.setCode(HttpServletResponse.SC_NOT_FOUND,
|
Map<String, Object> nextActionModel = new HashMap<String, Object>(2);
|
||||||
"Node " + nodeRef.toString() + " does not have a disposition lifecycle");
|
nextActionModel.put("notFound", true);
|
||||||
return null;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user