Results 1 to 4 of 4

Thread: contentObject element in zimlet definition file

  1. #1
    Join Date
    Feb 2007
    Rep Power

    Default contentObject element in zimlet definition file


    I have gone through sample zimlets like that for date,url,emails...
    In all of them the contentObject element specifies a attribute named type.

    Can anybody please tell me what does that represent and what is its purpose??


  2. #2
    Join Date
    Oct 2005
    Rep Power


    It's there largely for historical reason. New zimlets don't need type attribute in contentObject element.

  3. #3
    Join Date
    Feb 2007
    Rep Power

    Default One more query

    Thanks a lot JLee for your reply.

    I have one more query to ask about regarding contentObject.

    The scenario is i have to select some content in the email with the mouse and in the contextmenu i have provided some menu items clicking on which a dialog gets opened up with a input field.What i need to do is the content which is previously selected by the user should get populated in the input field of the dialog box opened on click of a contextMenu Item.

    I have no idea regarding how to do this and hence would appreciate every suggestion from anybody.

    Last edited by jiggy; 02-28-2007 at 10:45 PM.

  4. #4
    Join Date
    Jul 2012
    Rep Power


    ZmZimletBase has a match method. Maybe you could overload that method and play with it.

    {array} match(content, startIndex)
    This method is called when content (e.g. a mail message) is being parsed. The match method may be called multiple times for a given piece of content and should apply the pattern matching as defined for a given zimlet <regex>. Zimlets should also use the "g" option when constructing their <regex>.

    The return should be an array in the form:

    result[0...n] // should be matched string(s)
    result.index // should be location within line where match occurred
    result.input // should be the input parameter content

    {string} content
    the content line to perform a match against
    {number} startIndex
    the start index (i.e. where to begin the search)

    {array} the matching content object from the startIndex if the content matched the specified zimlet handler regular expression; otherwise null

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 09:06 AM
  2. centos 5 zimbra 4.5.6 no statistics
    By rutman286 in forum Installation
    Replies: 9
    Last Post: 08-14-2007, 09:30 AM
  3. Opensource backup Question.
    By nfear24 in forum Administrators
    Replies: 3
    Last Post: 03-31-2007, 11:47 PM
  4. Traslation SVN tree status
    By meikka in forum I18N/L10N - Translations
    Replies: 7
    Last Post: 02-13-2007, 10:13 AM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 12:01 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