<?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: Extending Share widgets in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289459#M242589</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;Here you're extending a region not a markup section.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regions are there to bind components to, not to append inline code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect this is the reason for your error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;More about regions and markup here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://blogs.alfresco.com/wp/developer/2011/08/12/customizing-alfresco-share-freemarker-templates/" rel="nofollow noopener noreferrer"&gt;http://blogs.alfresco.com/wp/developer/2011/08/12/customizing-alfresco-share-freemarker-templates/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I like that approach less than your original one. I like the idea of having everything related to a component contained in that component and not in the global template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I still don't understand why it doesn't work and don't have the time to build a project to test and debug it right now. Sorry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to be sure:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the .html.ftl you initially copy/pasted, there are 2 "&amp;lt;" in "&amp;lt;&amp;lt;@markup id"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a typo and not your actual code, right?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jan 2014 09:30:17 GMT</pubDate>
    <dc:creator>scouil</dc:creator>
    <dc:date>2014-01-14T09:30:17Z</dc:date>
    <item>
      <title>Extending Share widgets</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289454#M242584</link>
      <description>Hi all. This is somewhat related to my previous question (http://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/customising-share-widgets-01082014-1810) which I am using as a stepping stone for my next task. My ultimate goal is to be able to make the preview on the docume</description>
      <pubDate>Fri, 10 Jan 2014 16:35:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289454#M242584</guid>
      <dc:creator>stuartleyland</dc:creator>
      <dc:date>2014-01-10T16:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Share widgets</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289455#M242585</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;Very nicely written extension.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Only thing I'd change might be the use of widgetUtils in the .get.js if you're &amp;gt;= 4.2.e or 4.2.0 enterprise&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For your problem I don't really know. Can you check if your cleint-side javascript is being correctly imported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you just try to use the console to see if Training.custom.WebPreview actually exists once the page is fully loaded? &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 17:29:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289455#M242585</guid>
      <dc:creator>scouil</dc:creator>
      <dc:date>2014-01-10T17:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Share widgets</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289456#M242586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your reply. Could you explain what you mean by the following please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Only thing I'd change might be the use of widgetUtils in the .get.js if you're &amp;gt;= 4.2.e or 4.2.0 enterprise&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been doing some further experimentation and found that if I take the two &amp;lt;@script&amp;gt; lines from my &lt;/SPAN&gt;&lt;STRONG&gt;web-preview.get.html.ftl&lt;/STRONG&gt;&lt;SPAN&gt; file and add them to &lt;/SPAN&gt;&lt;STRONG&gt;web-preview-js-dependencies.lib.ftl&lt;/STRONG&gt;&lt;SPAN&gt; in site-webscripts\org\alfresco\components\preview\include in the exploded war file everything works as expected, ie: I get a popup when the web previewer is ready.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now my question becomes, how can I extend the web-preview-js-dependencies.lib.ftl file? I have tried the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL style="list-style-type:decimal;"&gt;&lt;LI&gt;Renamed the web-preview.get.html.ftl file in my extension to match the one in the source.&lt;/LI&gt;&lt;LI&gt;Copied the existing &amp;lt;customization&amp;gt; tag from the extension XML file and pasted it underneath and added '.include' to the end of the &amp;lt;targetPackageRoot&amp;gt;, ie:&lt;/LI&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;customizations&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customization&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;targetPackageRoot&amp;gt;org.alfresco.components.preview&amp;lt;/targetPackageRoot&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sourcePackageRoot&amp;gt;com.XXX.training.components.preview.customization&amp;lt;/sourcePackageRoot&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customization&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///New Tag&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customization&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;targetPackageRoot&amp;gt;org.alfresco.components.preview.include&amp;lt;/targetPackageRoot&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sourcePackageRoot&amp;gt;com.XXX.training.components.preview.customization&amp;lt;/sourcePackageRoot&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customization&amp;gt;&lt;BR /&gt;&amp;lt;/customizations&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;/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;LI&gt;Modified the &amp;lt;sourcePackageRoot&amp;gt; tag in the new &amp;lt;customization&amp;gt; tag to add '.include' and moved the FTL file into an include folder in my extension&lt;/LI&gt;&lt;/OL&gt;&lt;SPAN&gt;I worked through these in the order above without undoing the previous change, ie: i tried step 1, it didn't work so I tried step 2 but left the project as it was at the end of step 1. None of these changes have worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is what I'm trying to achieve possible? Should I being going about it some other way?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 15:26:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289456#M242586</guid>
      <dc:creator>stuartleyland</dc:creator>
      <dc:date>2014-01-13T15:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Share widgets</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289457#M242587</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;For my first point, starting the versions I quoted you have a new root object called widgetUtils.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With "widgetUtils.findObject" you can do the same as your loop in a single call (no doubt there is a loop behind the call but I still find it cleaner).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;c.f. &lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/developer/2013/11/25/webscript-javascript-controller-extensions-recap/" rel="nofollow noopener noreferrer"&gt;http://blogs.alfresco.com/wp/developer/2013/11/25/webscript-javascript-controller-extensions-recap/&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; for an example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;About extending the lib, first I'm not sure it's possible this way (don't think so), second I don't think it's a good idea.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example the documentlist component includes that same lib. I'm not sure you want to append your js in that context too (even though it would have no effect since the js object is not instantiated)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, according to your second screenshot, if I understand well, your javascript is correctly included, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;At least the javascript line to import it is there. Which is why I was wondering if it actually imported your js and if your self-contained function actually got executed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 17:29:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289457#M242587</guid>
      <dc:creator>scouil</dc:creator>
      <dc:date>2014-01-13T17:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Share widgets</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289458#M242588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for pointing out the widgetUtils.findObject() method, now you mention it I have seen it used elsewhere and I'll clean my code up to use that - like you say it's more obvious what is going on there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've spent some more time today investigating this and I've had another idea. I feel like I should include my JavaScript files in the document-details.ftl file in alfresco\templates\org\alfresco as this is the file that deals with bringing in all of the components for that page. However I have so far been unable to get this to work. This is my document-details.ftl file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;@region id="custom-javascript" target="web-preview" action="before" scope="template"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;@script type="text/javascript" src="${url.context}/res/jquery/jquery-1.6.2.js" group="web-preview"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;@script type="text/javascript" src="${url.context}/res/components/preview/extensions/floating-preview.js" group="web-preview"/&amp;gt;&lt;BR /&gt;&amp;lt;/@&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Going to the document details page results in a blank page with nothing more enlightening in the logs than:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;2014-01-13 17:54:08,428&amp;nbsp; WARN&amp;nbsp; [extensibility.impl.ExtensibilityModelImpl] [http-apr-8081-exec-3] The 'before' action was attempted to used when defining the base model by directive:ID: custom-javascript, ACTION:before&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this seem like a better route to take? If so, any advice on how to resolve this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 17:55:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289458#M242588</guid>
      <dc:creator>stuartleyland</dc:creator>
      <dc:date>2014-01-13T17:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Share widgets</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289459#M242589</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;Here you're extending a region not a markup section.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regions are there to bind components to, not to append inline code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect this is the reason for your error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;More about regions and markup here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://blogs.alfresco.com/wp/developer/2011/08/12/customizing-alfresco-share-freemarker-templates/" rel="nofollow noopener noreferrer"&gt;http://blogs.alfresco.com/wp/developer/2011/08/12/customizing-alfresco-share-freemarker-templates/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I like that approach less than your original one. I like the idea of having everything related to a component contained in that component and not in the global template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I still don't understand why it doesn't work and don't have the time to build a project to test and debug it right now. Sorry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to be sure:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the .html.ftl you initially copy/pasted, there are 2 "&amp;lt;" in "&amp;lt;&amp;lt;@markup id"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a typo and not your actual code, right?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 09:30:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289459#M242589</guid>
      <dc:creator>scouil</dc:creator>
      <dc:date>2014-01-14T09:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Share widgets</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289460#M242590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have managed to fix my problem. Let's ignore the problems I had with the intermediate steps and go back to the original problem. The issue was that the JavaScript file containing the definition for a component was being included in the page &lt;/SPAN&gt;&lt;STRONG&gt;after&lt;/STRONG&gt;&lt;SPAN&gt; the page had tried to instantiate the component. The reason for this was because of the &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;group&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; element within the &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;@script&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; tag in the FreeMarker Template file. If you look at the original code the value was 'web-preview'. To fix the problem I changed this value to 'document-details'. &lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/developer/2012/06/01/customizing-share-javascript-widget-instantiation-part-4/" rel="nofollow noopener noreferrer"&gt;This blog post by Dave Draper&lt;/A&gt;&lt;SPAN&gt; explains in further detail but a summary (and the specific details of my problem) will probably help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Summary&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;group&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; element of the &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;@script&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; tag is used by Alfresco so that it can make one request for all files in a group.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Example&lt;/SPAN&gt;&lt;SPAN&gt; - taken from the blog post&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;FreeMarker Template&lt;/EM&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;@script src="/aaa.js" group="1"/&amp;gt;&lt;BR /&gt;&amp;lt;@script src="/bbb.js" group="2"/&amp;gt;&lt;BR /&gt;&amp;lt;@script src="/ccc.js" group="3"/&amp;gt;&lt;BR /&gt;&amp;lt;@script src="/ddd.js" group="2"/&amp;gt;&lt;BR /&gt;&amp;lt;@script src="/eee.js" group="1"/&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;HTML output&lt;/EM&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;script src="/aaa.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script src="/eee.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script src="/bbb.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script src="/ddd.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script src="/ccc.js"&amp;gt;&amp;lt;/script&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note the aaa.js and eee.js were in the same group and were requested and output before bbb.js.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Specifics&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;webapps\share\WEB-INF\classes\alfresco\templates\org\alfresco\document-details.ftl&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The following lines are at the top of this file, well before any components are added to the page (including the previewer):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;@templateHeader&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;@script type="text/javascript" src="${url.context}/res/modules/documentlibrary/doclib-actions.js" group="document-details"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;@link rel="stylesheet" type="text/css" href="${url.context}/res/components/document-details/document-details-panel.css" group="document-details"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;@templateHtmlEditorAssets /&amp;gt;&lt;BR /&gt;&amp;lt;/@&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note the &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;group&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; value for the &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;@script&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; tags - "document-details".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By changing the &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;group&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; value in my extension class to "document-details" I could ensure that these files were loaded before the component was instantiated. For completeness here is my extension file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;web-preview.get.html.ftl&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;@markup id="custom-javascript" target="js" action="after" scope="global"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@script type="text/javascript" src="${url.context}/res/jquery/jquery-1.6.2.js" group="document-details"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;@script type="text/javascript" src="${url.context}/res/components/preview/extensions/floating-preview.js" group="document-details"/&amp;gt;&lt;BR /&gt;&amp;lt;/@markup&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully this will be of use to the next person who comes across this problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 12:13:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289460#M242590</guid>
      <dc:creator>stuartleyland</dc:creator>
      <dc:date>2014-01-14T12:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Share widgets</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289461#M242591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Scouil,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your reply. As you can see I've solved my problem. Thanks for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Stuart&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 12:16:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/extending-share-widgets/m-p/289461#M242591</guid>
      <dc:creator>stuartleyland</dc:creator>
      <dc:date>2014-01-14T12:16:07Z</dc:date>
    </item>
  </channel>
</rss>

