AnsweredAssumed Answered

Alfresco 4.x Share custom page with Java backed script load

Question asked by m_scapoli on Apr 2, 2012
Latest reply on Apr 27, 2012 by m_scapoli
Hi there!

I'm trying, and partially done, to extend Alfresco 4.0c with an action that load a new page (in the style of alfresco's pages) and load a certain webscript that I have written but when I try to load the webscript I run into Web Script Status 500 - Internal Error

I was inspired by the DocumentGeographicDetails and with some "reverse engineering" I could create a new action and link that to a new page declaration, then I unsuccessful try to recall a Java backed Script (that it works when I call it separately) in a certain region <region-id>doclib-custom</region-id> at the end of  template-instances.xml




I've tryed to load the script in the <region-id>doclib-custom</region-id> at the end of  template-instances.xml

<?xml version='1.0' encoding='UTF-8'?>

      <!– Title –>
            <sub-component id="default">

      <!– Custom Component –>



   <shortname>Document Diff Hook</shortname>
   <description>document-diff hook for declarative.json</description>
the .msg try to hook at the repo-extension project that is simply the Simple Declarative Web Script Project from the Java backed Wiki page…

var connector = remote.connect("alfresco/service");
var data = connector.get("/documentdiff/declarative.json");

// create json object from data
var result = eval('(' + data + ')');
model.diffhook = result["declarative"];

I also tryed to work adding additional region with the <@region> directive as it is written in the David Draper's - Customizing Alfresco Share FreeMarker Templates but without results. I tryed to recall the same "Hello World" script code in my custom page above under the node-header region with this code but don't work


    <id>Blog Module (Add Region)</id>

<@region id="additional-content" target="node-header" action="after" scope="global" />


certainly is my fault but the poor documentation and the wiki are of little help, thanks in advance to anyone responding to the question