require is not defined
Closed this issue · 0 comments
ZiGGy01011010 commented
Just installed the latest version of the plugin. On the page I created a region of type dhtmlxGantt. I received the error "require is not defined" in the console.
Here is the part of the page generated by Apex where the error occurred:
<script type="text/javascript">
apex.da.initDaEventList = function(){
apex.da.gEventList = [
{"name":"New","bindEventType":"ready","anyActionsFireOnInit":false,actionList:[{"eventResult":true,"executeOnPageInit":false,"stopExecutionOnError":true,javascriptFunction:function (){
require(['knockout', 'ojs/ojbootstrap', 'ojs/ojflattenedtreedataproviderview', 'ojs/ojarraytreedataprovider', 'ojs/ojknockouttemplateutils',
'ojs/ojknockout', 'ojs/ojtable', 'ojs/ojrowexpander'],
function (ko, Bootstrap, FlattenedTreeDataProviderView,
ArrayTreeDataProvider, KnockoutTemplateUtils) {
function ViewModel() {
this.datasource = ko.observable();
this.KnockoutTemplateUtils = KnockoutTemplateUtils;
var arrayTreeDataProvider = new ArrayTreeDataProvider(JSON.parse(jsonData), { keyAttributes: 'id' });
this.datasource(new FlattenedTreeDataProviderView(arrayTreeDataProvider,
{ expanded: this.expanded }));
} Bootstrap.whenDocumentReady().then(
function () { ko.applyBindings(new ViewModel(), document.getElementById('tableWrapper')); } );
});
},"action":"NATIVE_JAVASCRIPT_CODE"}]}];
}
</script>
Apex version 23.1.2.