Include JS libary in FreeMarker

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Include JS libary in FreeMarker

Hi there,

I just followed this guidance https://docs.alfresco.com/community/tasks/ws-forms-process.html to create multipart forms with webscript and it worked perfectly. Now i'd like to include another library.js and use it to call function in multipart.post.js, please guilde me how to achieve this ! thank you.

2 Replies
Highlighted
Advanced

Re: Include JS libary in FreeMarker

I'm not sure whether I understood what you want to achieve.

Multipart.post.js is executed in server side , if you want to include js libary in freemarker,it is excuted in client side.

If you want to call a client side js in freemarker,you can include it like this

<script type="text/javascript" src="${url.context}/scripts/xxxx.js"></script>

If you want to call another js in multipart.post.js,you can import it like following.

<import resource="classpath:alfresco/templates/webscripts/***/***/***.js">

 

Highlighted
Senior Member II

Re: Include JS libary in FreeMarker

Hi,

multipart.post.js is server side file and library.js is client side so i dont think you can achive this.

Thanks & Regards,
Sanjay