Preview of content using jssp
I am attempting to build a jssp page for content preview to be used inside a webapp for content creation. The goal is to have an iframe show the transformed content, just as the preview shown in the client content editor.
I got this:
<%
logonEscalation("webapp");
response.setContentType("text/html;charset=utf-8");
var preview =[]
var contentId = 86800;
if(contentId>0){
preview = ncm.publishing.TransformJavaScript("rbe:blockContent","HTML", 86800 )
}
document.write( preview[1]!=undefined ? preview[1].toSource() : "No content found")
%>
And get error:
SOP-330011 Error while executing the method 'TransformJavaScript' of service 'ncm:publishing'.
Can anyone suggest what I should be doing?