Hi all,

I want to use the uiLabelMap variable in a .js I've created in order to set
the defaults of any sort for jQuery plugins like validator. To do that I
just included this in the main-decorator (CommonScreens.xml):

<set field="layoutSettings.javaScripts[]" value="/images/defaults.js"
global="true"/>

In this file I put the code like that:

jQuery.extend(jQuery.validator.messages, {
  required: '${uiLabelMap.EcommerceRequired}'
});


Of course, this is not properly rendered, so the question is: Would you put
all the javascript code in the header.ftl for example?

Thanks in advance.

Regards,

Jonatan Soto

Reply via email to