AnsweredAssumed Answered

How to include a new client side javascript dependency into form.get.html.ftl

Question asked by douglascrp Moderator on Apr 19, 2016
Latest reply on Apr 20, 2016 by douglascrp
Hello.

I'm trying to include a new dependency for form.get.html.ftl using a extension module.

My custom ftl file contains the following code:

<@markup id="group-member-form-control-dependencies" target="js" action="after" scope="global">
   <@script src="${url.context}/res/components/object-finder/group-member.js" group="form"/>
</@markup>

But it seems my code is ignored.

The extension module definition is:
<extension>
    <modules>
        <module>
            <id>Custom group member form control dependencies</id>
            <auto-deploy>true</auto-deploy>
            <customizations>
                <customization>
                    <targetPackageRoot>org.alfresco.components.form</targetPackageRoot>
                    <sourcePackageRoot>org.orderofthebee.components.form</sourcePackageRoot>
                </customization>
            </customizations>
        </module>
    </modules>
</extension>

What I ended up doing is including the dependency using share-config:


    <config>
        <forms>
            <dependencies>
                <js src="/components/object-finder/group-member.js" />
            </dependencies>
        </forms>
    </config>

Outcomes