cancel
Showing results for 
Search instead for 
Did you mean: 

Aikau internationalization (i18n) not working when loading widget as a control with form engine

iblanco
Confirmed Champ
Confirmed Champ
Hello,

I'm developing a custom page that uses the form engine javascript api to render a form. I need a custom control in this form so I'm developing it using Dojo and the new Aikau framework. Everything seems to work as expected except that internationalization messages aren't being loaded properly.

Debuging with firebug I managed to spot that the different message scopes defined by the widget are loaded into Alfresco.messages by a dinamically generated resource url, but my widget's scope is not there.

I suppose this is because my widget is not processed through "<@processJsonModel group="share"/>", is not instantiated by Share's webscript backend. It is loaded as part of a form and is instantiated by my control.

So, does this mean that the i18n loading features of Aiku can not be used in controls?

Or maybe I should build my widget in a differente way? This is how my control builds the widget:


<script type="text/javascript">//<![CDATA[
require(["custom/controls/OrderedUserList"], function (OrderedUserList) {
    var config = {};
    <#if form.mode == "edit">
    config.nodeRef = "${form.arguments.itemId}";
    </#if>
    <#if field.control.params.reorder??>
    config.reorder = ${field.control.params.reorder?string};
    </#if>
    <#if field.control.params.type??>
    config.type = "${field.control.params.type}";
    </#if>
    var orderedUserList = new OrderedUserList(config, "${fieldHtmlId}-widget");
});
//]]></script>
<div id="${fieldHtmlId}-widget">
</div>
<input id="${fieldHtmlId}" type="hidden" value="">


Thanks
1 REPLY 1

iblanco
Confirmed Champ
Confirmed Champ
I can confirm that CSS resources aren't processed either.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.