<?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: Understanding Script inclusion in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295985#M249115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;alfresco will recursively resolve imports in a javascript file A, and combine the scriplet in A and all the scriplets in imports file into a script string ,and send this script string to rhino engine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example ,you can create a utils.js file which include many utils functions and saved it in class path&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you can include this js file into other js files and call it's function,just as import other classes in java language or include some other c header files in c language.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;import resource="classpath:com/yourclasspath/utils.js"&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 May 2014 15:55:25 GMT</pubDate>
    <dc:creator>kaynezhang</dc:creator>
    <dc:date>2014-05-07T15:55:25Z</dc:date>
    <item>
      <title>Understanding Script inclusion</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295984#M249114</link>
      <description>Coming from s Javascript background I used to include files in html pages which have function in it to be invoked, often with parameters.Things seems quite different with Alfresco Script (and Web Script). As it is stated in Alfresco Doc&amp;lt;cite&amp;gt;Scripts can also include (or "import") other scripts</description>
      <pubDate>Wed, 07 May 2014 09:33:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295984#M249114</guid>
      <dc:creator>leonardo_celati</dc:creator>
      <dc:date>2014-05-07T09:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding Script inclusion</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295985#M249115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;alfresco will recursively resolve imports in a javascript file A, and combine the scriplet in A and all the scriplets in imports file into a script string ,and send this script string to rhino engine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example ,you can create a utils.js file which include many utils functions and saved it in class path&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you can include this js file into other js files and call it's function,just as import other classes in java language or include some other c header files in c language.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;import resource="classpath:com/yourclasspath/utils.js"&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 15:55:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295985#M249115</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-05-07T15:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding Script inclusion</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295986#M249116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, the point was infact to know if the Script could contains function(), I tought this was not possible, but I was wrong as you made me notice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, just an 'academic question', can I invoke a Script from a Script rather than including it ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 10:35:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295986#M249116</guid>
      <dc:creator>leonardo_celati</dc:creator>
      <dc:date>2014-05-08T10:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding Script inclusion</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295987#M249117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No ,you can't&amp;nbsp; invoke a script from a script without including it.you can invoke a script using java .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 13:56:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/understanding-script-inclusion/m-p/295987#M249117</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-05-08T13:56:33Z</dc:date>
    </item>
  </channel>
</rss>

