cancel
Showing results for 
Search instead for 
Did you mean: 

undefined is not a function in dashlet

jordiv
Champ on-the-rise
Champ on-the-rise
Hi,

I've done a dashlet with a configuration dialog, but when I click in the "Configure" link I get the following javascript error:

Uncaught TypeError: undefined is not a function
The problematic line of code is the following:

this.configDialog = new Alfresco.module.SimpleDialog(this.id + "-configDialog").setOptions( {
The problem seems to be that Alfresco.module.SimpleDialog() function is not defined. If I add the RSS Dashlet in the dashboard, then it works fine. I guess I'm missing an import or something like that, but I've searched in the rssfeed dashlet source code and I couldn't find it.

Any ideas?


Thanks,
Jordi.
2 REPLIES 2

jordiv
Champ on-the-rise
Champ on-the-rise
Ok I've found it. I was missing a javascript import in my head ftl template:

<@script type="text/javascript" src="${page.url.context}/res/modules/simple-dialog.js"></@script>


Cheers,
Jordi.

yascorp
Champ in-the-making
Champ in-the-making
I have the same error and I include my js in my head ftl, didn't understand the reason !
can you help me, thnx & regards