AnsweredAssumed Answered

Validation handler not deploying javascript in war

Question asked by gscorreia93 on Jan 3, 2019
Latest reply on Jan 30, 2019 by sanjaybandhniya



I am having a problem creating a custom validation handler in my alfresco. Whenever I start alfresco the war doesn't include my javascript file (test.js) that I placed inside the share project in the resources folder. When I try to use the form and the handler should come into action I get a error 404 saying that the resource test.js in not available. The path for my javascript file is: src/main/resources/js/test.js



           <js src="/js/test.js"/>


<field id="dts:field1" >
             <constraint type="MANDATORY" validation-handler="MyCustomNamespace.validateForm" event="keyup"/>



if (typeof MyCustomNamespace == "undefined" || !MyCustomNamespace) {
var MyCustomNamespace = {};

MyCustomNamespace.validateForm =
function validateForm(field, args, event, form, silent, message) {

Am I doing something wrong? I followed the documentation on the alfresco website:

Form Field Validation Handlers | Alfresco Documentation 


Thanks in advance for any help