Basic Zimlet Definition Tags

Revision as of 20:34, 25 July 2009 by Jaskiern (talk | contribs) (Moved property info from getUserPropertyInfo API doc)

zimlet

<zimlet> tag is the top level element for Zimlet definition file.

Supported attributes:

  • name - must match the name of Zimlet definition XML file.
  • version
  • description
  • target
    Space-separated list of targets. Valid values include "main" (default), "compose-window", and "view-window".

May contain following elements:

  • include
  • includeCSS
  • resource
  • handlerObject
  • zimletPanelItem
  • contentObject
  • serverExtension
  • userProperties

include

Indicates Javascript files used by the Zimlet. The listed Javascript files are automatically loaded by the Zimlet framework in the order specified in the definition file.

includeCSS

Indicates CSS style sheet files used by the Zimlet. The listed CSS files are automatically loaded by the Zimlet framework in the order specified in the definition file.

resource

Indicates additional resource files, such as XSL, GIF, or JPEG images.

handlerObject

Name of the top level Javascript object. The object must declare ZimletBase as the prototype. The object is automatically instantiated by Zimlet framework.

zimletPanelItem

Creates an entry in the Zimlet panel area.

Supported attributes:

  • label
  • icon

May contain following elements:

  • toolTipText
  • dragSource
  • contextMenu

contentObject

Specify the behavior of content object in the document that Zimlet matches.

May contain following elements:

  • matchOn
  • toolTip

serverExtension

Specify the rules for server side indexing.

Supported attributes:

  • hasKeyword
  • extensionClass
  • regex

userProperties

Lists per-user properties used by the Zimlet.

property

  • name: The variable name of the user property.
  • label: The "pretty name" of the user property to be displayed in the Property Editor. If it does not exist, it will default to value of the name property.
  • value: The pre-populated value of the property. It will be displayed in the Property Editor property field.
  • Visible: True if the property should be displayed in the Property editor.
  • Type: This will be one of:

    • Zimlet.STRING_PROP
    • Zimlet.PASSWORD_PROP
    • Zimlet.NUMBER_PROP
    • Zimlet.DATE_PROP
    • Zimlet.SELECT_PROP

The properties are supported for the specific property types:

  • string
    • minLen - Minimum length for the string (optional)
    • maxLen - Maximum length for the string (optional)
  • password

    • minLen - Minimum length for the string (optional)
    • maxLen - Maximum length for the string (optional)
  • number
    • minVal - Minimjum value for the number (optional)
    • maxVal - Maximum value for the number (optional)
  • date
    • N/A
  • select
    • items - an array of the items in the select. There will always be atleast one item in this array. Each item has two keys.
      • label - The label to be displayed for the item (Required)
      • value - The value for the item (Required)
Jump to: navigation, search