Results 1 to 4 of 4

Thread: [SOLVED] Get the zimlet version number via JavaScript?

  1. #1
    Join Date
    Apr 2008
    Location
    Vancouver, BC
    Posts
    54
    Rep Power
    7

    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

  2. #2
    Join Date
    Sep 2005
    Posts
    187
    Rep Power
    10

    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!

  3. #3
    Join Date
    Nov 2009
    Posts
    105
    Rep Power
    6

    Default

    An alternative is:

    ZmZimletMgr mgr = this.getZimletManager();
    ZmZimletContext cxt = mgr.getZimletByName("com_zimbra_zimlet_name");
    cxt.version

  4. #4
    Join Date
    Apr 2008
    Location
    Vancouver, BC
    Posts
    54
    Rep Power
    7

    Default

    Great, thanks guys!
    Graham Ballantyne
    Simon Fraser University

Similar Threads

  1. How to call a normal javascript in the zimlet?
    By anuradha_mihsra in forum Zimlets
    Replies: 1
    Last Post: 01-19-2009, 07:43 AM
  2. Invoking Zimlet JSP from Zimlet Javascript
    By Chewie71 in forum Zimlets
    Replies: 0
    Last Post: 12-22-2008, 10:12 PM
  3. Replies: 0
    Last Post: 05-31-2008, 04:40 PM
  4. Debian - Upgrade from 4.5.6
    By magikman in forum Installation
    Replies: 1
    Last Post: 01-19-2008, 12:59 PM
  5. zimlet javascript errors IE7
    By danpep in forum Users
    Replies: 8
    Last Post: 08-21-2007, 10:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •