<?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: No top level scope? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/no-top-level-scope/m-p/292689#M245819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;did you mean you have changed your webscript form javascript based to java backed webscript and now you are facing problem in the ftl?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;could you post your ftl?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Mar 2013 09:01:26 GMT</pubDate>
    <dc:creator>mitpatoliya</dc:creator>
    <dc:date>2013-03-23T09:01:26Z</dc:date>
    <item>
      <title>No top level scope?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/no-top-level-scope/m-p/292688#M245818</link>
      <description>HiI'm reworking a Javascript webscript into a Java one. The Java one now extends DeclarativeWebscript and returns a Map of Lists of Maps, etc. down to a ScriptNode.item.put("node", new ScriptNode(nodeRef, _serviceRegistry));‍‍The freemarker which takes the model from the Java is erroring:…Caused by:</description>
      <pubDate>Fri, 22 Mar 2013 22:54:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/no-top-level-scope/m-p/292688#M245818</guid>
      <dc:creator>cs02rm0</dc:creator>
      <dc:date>2013-03-22T22:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: No top level scope?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/no-top-level-scope/m-p/292689#M245819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;did you mean you have changed your webscript form javascript based to java backed webscript and now you are facing problem in the ftl?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;could you post your ftl?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2013 09:01:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/no-top-level-scope/m-p/292689#M245819</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2013-03-23T09:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: No top level scope?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/no-top-level-scope/m-p/292690#M245820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If anyone still wants to know how to properly instantiate ScriptNode from a pure java-backed webscript, here's how:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;Context context = Context.enter();&lt;BR /&gt;Scriptable scope = context.initStandardObjects();&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scriptNode = new ScriptNode(nodeRef, services, scope);&lt;BR /&gt;}&lt;BR /&gt;finally&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Context.exit();&lt;BR /&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;/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;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For more explanation, see &lt;/SPAN&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Scopes_and_Contexts" rel="nofollow noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Scopes_and_Contexts&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, while the alfresco code supports creating ScripNode instances without a context and scope, many of the ScriptNode methods actually require a context and scope, or they will throw NullpointerExceptions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is still true in Alfresco 5&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 12:28:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/no-top-level-scope/m-p/292690#M245820</guid>
      <dc:creator>electroshokker</dc:creator>
      <dc:date>2015-10-14T12:28:08Z</dc:date>
    </item>
  </channel>
</rss>

