Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-2009, 03:05 AM
Member
 
Posts: 10
Default [SOLVED] Javascript error this.__initCtrl is not a function

Hi,

I am new to Zimbra and working with 5.0.9. I have developed following classes for a zimlet -

Pop-up class - SampleDialog extends DwtDialog

TabView class - SampleTabView extends DwtTabView

when user clicks on a zimlet link SampleDialog opens up and tries to instantiate SampleTabView thru a method call _initializeSampleTabView. SampleTabView has following content -

SampleTabView = fuction(parent, className, position){

DwtTabView.call(this,parent,className,position);

};

SampleTabView.prototype = new DwtTabView;
SampleTabView.prototype.constructor = SampleTabView;

SampleDialog and SampleTabView are located in a single file SampleDialog.js

Problem - I am getting following error whenever SampleDialog tries to execute _initializeSampleTabView method. The error is -

"this.__initCtrl is not a function"

I created another class, TestTabView with same content as SampleTabView and placed in a seperate file as TestTabView.js.However whenever SampleDialog tries to instantiate this class thru _initializeSampleTabView I am getting other error -

"TestTabView is not defined"

I ensured thru firebug console that the required js files are fetched by browser.

Can somebody please help me to resolve this issue.

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 03-05-2009, 05:39 AM
Member
 
Posts: 10
Default Reply: Javascript error this.__initCtrl is not a function

"TestTabView is not defined" issue is resloved however I am now getting the same error as with SampleViewTab when _initializeSampleTabView tries to instantiate TestTabView i.e. -

"this.__initCtrl is not a function"

Any pointer on this is highly appreciated.
Please ignore typo "fuction" in above post.

Thanks!
Reply With Quote
  #3 (permalink)  
Old 03-15-2009, 11:34 PM
Member
 
Posts: 10
Default Reply: Javascript error this.__initCtrl is not a function

The problem is resolved. It was because of I put my new JS classes in improper folder structure.

Thanks!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.