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

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-03-2010, 11:19 AM
Trained Alumni
 
Posts: 48
Default [SOLVED] Get the zimlet version number via JavaScript?

The zimlet XML definition file specifies a version attribute:
Code:
<zimlet name="ca_sfu_icat_mysfu" version="1.0" description="MySFU Zimlet">
Is there a JavaScript API for getting that version number, or am I limited to creating a property in the config_template.xml file (duplicating the version number) and getting it using ${config.global.propertyName}?
__________________
Graham Ballantyne
Simon Fraser University
Reply With Quote
  #2 (permalink)  
Old 03-03-2010, 11:26 AM
Zimbra Employee
 
Posts: 187
Default

Within the Zimlet, you could do:
Code:
this._zimletContext.version
PS: this._zimletContext will have all the information that were loaded via xml definition file.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 03-03-2010, 11:36 AM
Zimbra Employee
 
Posts: 105
Default

An alternative is:

ZmZimletMgr mgr = this.getZimletManager();
ZmZimletContext cxt = mgr.getZimletByName("com_zimbra_zimlet_name");
cxt.version
Reply With Quote
  #4 (permalink)  
Old 03-03-2010, 11:42 AM
Trained Alumni
 
Posts: 48
Default

Great, thanks guys!
__________________
Graham Ballantyne
Simon Fraser University
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.