<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Alfresco 4.x Share custom page with Java backed script load in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252985#M206115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;PS. I will make sure your thoughts are picked up by our community officer and documentation team.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;thanks a lot&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry I forgot to update&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FIX UPDATE: it's &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;model.diffhook = result;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; and not &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;model.diffhook = result["declarative"];&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; because isn't a list but only one json object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Apr 2012 08:31:43 GMT</pubDate>
    <dc:creator>m_scapoli</dc:creator>
    <dc:date>2012-04-27T08:31:43Z</dc:date>
    <item>
      <title>Alfresco 4.x Share custom page with Java backed script load</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252981#M206111</link>
      <description>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 ErrorI was inspired by the Documen</description>
      <pubDate>Mon, 02 Apr 2012 18:51:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252981#M206111</guid>
      <dc:creator>m_scapoli</dc:creator>
      <dc:date>2012-04-02T18:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco 4.x Share custom page with Java backed script load</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252982#M206112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather than referring to "the poor documentation and the wiki are of little help" please consider either come with a distinct list of requirements with what you miss in the documentation OR create and contribute it yourself after you have learned it. We are doing the best we can. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is very hard to help you without knowing what the actual error is, you mind sending over the actual error you get in as much detail as possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However if I should guess what the error might be my vote would be that the following line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var connector = remote.connect("alfresco/service");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var connector = remote.connect("alfresco");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers, Erik&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS. If you haven't seen it there is a thread that contains Share documentation at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://forums.alfresco.com/en/viewtopic.php?f=48&amp;amp;t=43694" rel="nofollow noopener noreferrer"&gt;https://forums.alfresco.com/en/viewtopic.php?f=48&amp;amp;t=43694&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 08:24:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252982#M206112</guid>
      <dc:creator>erikwinlof</dc:creator>
      <dc:date>2012-04-03T08:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco 4.x Share custom page with Java backed script load</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252983#M206113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok with the work in the morning I was able to load a Json Web Script in my page following these tutorials:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;A href="http://niketa-alfresco3.blogspot.it/2009/12/how-to-access-alfresco-repository-in.html" rel="nofollow noopener noreferrer"&gt;How to access Alfresco repository in Alfresco Share December 2009&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;A href="http://aboutalfresco.blogspot.it/2010/02/accessing-alfresco-repository-in-share.html" rel="nofollow noopener noreferrer"&gt;Accessing Alfresco repository in Share February 2010&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;are practically the same thing with a small variation… this is the result:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A href="http://desmond.imageshack.us/Himg341/scaled.php?server=341&amp;amp;filename=docdiffpagejson.png&amp;amp;res=medium" rel="nofollow noopener noreferrer"&gt;http://desmond.imageshack.us/Himg341/scaled.php?server=341&amp;amp;filename=docdiffpagejson.png&amp;amp;res=medium&lt;/A&gt;&lt;SPAN&gt;[/img]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what I'm trying to do is to load another Json Webscript called "Declarative" that is explained here: &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples#SimpleDeclarativeWebScript.java" rel="nofollow noopener noreferrer"&gt;SimpleDeclarativeWebScript.java&lt;/A&gt;&lt;SPAN&gt; from Piergiorgio Lucidi Alfresco Partner that write the wiki spurred by another request&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It is very hard to help you without knowing what the actual error is, you mind sending over the actual error you get in as much detail as possible?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;here the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[img]&lt;/SPAN&gt;&lt;A href="http://desmond.imageshack.us/Himg214/scaled.php?server=214&amp;amp;filename=surferror.png&amp;amp;res=medium" rel="nofollow noopener noreferrer"&gt;http://desmond.imageshack.us/Himg214/scaled.php?server=214&amp;amp;filename=surferror.png&amp;amp;res=medium&lt;/A&gt;&lt;SPAN&gt;[/img]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it seems that the error is in the &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;eval('(' + data + ')');&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt; section:&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;alfresco/web-extension/site-webscripts/ext/documentdiff/components/diffhook.get.js&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var connector = remote.connect("alfresco");&lt;BR /&gt;var data = connector.get("/documentdiff/declarative.json");&lt;BR /&gt;&lt;BR /&gt;// create json object from data&lt;BR /&gt;var result = eval('(' + data + ')');&lt;BR /&gt;model.diffhook = result["declarative"];&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;STRONG&gt;alfresco/web-extension/site-webscripts/ext/documentdiff/components/diffhook.get.desc.xml&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;webscript&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;shortname&amp;gt;Document Diff Hook&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;document-diff hook for declarative.json&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;family&amp;gt;family_docdiff_hook&amp;lt;/family&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;url&amp;gt;/components/diffhook&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;lt;/webscript&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;STRONG&gt;alfresco/web-extension/site-webscripts/ext/documentdiff/components/diffhook.get.html.ftl&lt;/STRONG&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;div&amp;gt;${diffhook.msg}&amp;lt;/div&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;to clarify I report the &lt;/SPAN&gt;&lt;EM&gt;declarative.get.json.ftl&lt;/EM&gt;&lt;SPAN&gt; from the &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples#SimpleDeclarativeWebScript.java" rel="nofollow noopener noreferrer"&gt;Simple Declarative Web Script&lt;/A&gt;&lt;SPAN&gt; that show how it handle the json response..&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;{&amp;nbsp;&amp;nbsp; "msg" : "Hello ${person.properties.userName}: ${speak}"}&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;However if I should guess what the error might be my vote would be that the following line:&lt;BR /&gt;var connector = remote.connect("alfresco/service");&lt;BR /&gt;should be:&lt;BR /&gt;var connector = remote.connect("alfresco");&lt;BR /&gt;&lt;BR /&gt;Cheers, Erik&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;yep this was a try that I've forgotten in the code when I posted it, had already been corrected, thanks anyway&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;PS. If you haven't seen it there is a thread that contains Share documentation at:&lt;BR /&gt;&lt;A href="https://forums.alfresco.com/en/viewtopic.php?f=48&amp;amp;t=43694" rel="nofollow noopener noreferrer"&gt;https://forums.alfresco.com/en/viewtopic.php?f=48&amp;amp;t=43694&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;yes I've also seen this, I already knew many of the links thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Rather than referring to "the poor documentation and the wiki are of little help" please consider either come with a distinct list of requirements with what you miss in the documentation OR create and contribute it yourself after you have learned it. We are doing the best we can.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;I apologize if I was not very fair, mine was just an opinion but imho it's very difficult to understand the Alfresco mechanism and "conventions over configuration", above all the AMP packaging practice (that none of the developers have used in the examples on his blog, this would help, for example), the maven alfresco archetype is in an ambiguous state (the wiki is not accurate pointing on outdated resources and bugged pom.xml and the documentation in this way it's poor)..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It 's very difficult to understand how things work through very old posts and understand what things are good and which ones to discard..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not know if it is totally my fault, maybe it is, but a reorganization of the documentation would help a lot so external developer would know exactly and easly what Alfresco development environment provides because this informations are only in your possession..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however, this remains an opinion and it will be further emphasized, do not worry&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to all&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 11:09:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252983#M206113</guid>
      <dc:creator>m_scapoli</dc:creator>
      <dc:date>2012-04-03T11:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco 4.x Share custom page with Java backed script load</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252984#M206114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would recommend running Share's javascript debugger and print out the value of "data" in the console.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://localhost:8081/share/page/api/javascript/debugger" rel="nofollow noopener noreferrer"&gt;http://localhost:8081/share/page/api/javascript/debugger&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;(If you get problem setting a break point try refreshing your webscript)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My guess is that what you get as result in data is a bunch of html saying that the webscript can't be found, and that the "eval" is trying to parse it as xml. Hopefully you will find an error message in the html from the "data" variable. If not, take a closer look at your declarative.get.desc.xml file and see if you can spot the problem, i.e the url isn't matching "/documentdiff/declarative" (or possibly that you have set the "format" to "html" even thought I doubt it).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers and good luck, Erik&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS. I will make sure your thoughts are picked up by our community officer and documentation team.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 12:54:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252984#M206114</guid>
      <dc:creator>erikwinlof</dc:creator>
      <dc:date>2012-04-03T12:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco 4.x Share custom page with Java backed script load</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252985#M206115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;PS. I will make sure your thoughts are picked up by our community officer and documentation team.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;thanks a lot&amp;nbsp; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry I forgot to update&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FIX UPDATE: it's &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;model.diffhook = result;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; and not &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;model.diffhook = result["declarative"];&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; because isn't a list but only one json object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2012 08:31:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-4-x-share-custom-page-with-java-backed-script-load/m-p/252985#M206115</guid>
      <dc:creator>m_scapoli</dc:creator>
      <dc:date>2012-04-27T08:31:43Z</dc:date>
    </item>
  </channel>
</rss>

