ACE-2379 - 'Edit online' action is not working

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78925 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Stefan Kopf
2014-08-04 19:36:26 +00:00
parent dd85fdbc3b
commit 6e745c53ec
3 changed files with 12 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ package org.alfresco.repo.jscript;
import org.alfresco.repo.jscript.app.CustomResponse;
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.extensions.webscripts.DefaultURLModel;
import java.io.Serializable;
import java.util.Map;
@@ -49,9 +50,9 @@ public final class SlingshotDocLibCustomResponse extends BaseScopableProcessorEx
*
* @return The JSON string
*/
public String getJSON()
public String getJSON(DefaultURLModel url)
{
return this.getJSONObj().toString();
return this.getJSONObj(url).toString();
}
/**
@@ -59,7 +60,7 @@ public final class SlingshotDocLibCustomResponse extends BaseScopableProcessorEx
*
* @return The JSON object
*/
protected Object getJSONObj()
protected Object getJSONObj(DefaultURLModel url)
{
JSONObject json = new JSONObject();
@@ -68,7 +69,7 @@ public final class SlingshotDocLibCustomResponse extends BaseScopableProcessorEx
{
try
{
Serializable response = ((CustomResponse) entry.getValue()).populate();
Serializable response = ((CustomResponse) entry.getValue()).populate(url);
json.put(entry.getKey(), response == null ? JSONObject.NULL: response);
}
catch (JSONException error)