Zimlet Developers Guide:Application Context: Difference between revisions

(New page: == Overview == The Application Context is a global object available from your Handler Object. Using the Application Context object, you can access various application information, dialo...)
 
Line 1: Line 1:
== Overview ==
== Overview ==


Line 8: Line 6:
   
   
<pre>
<pre>
com_zimbra_test.prototype.myMethod =  
com_zimbra_test.prototype.myMethod =  
function() {
function() {

Revision as of 05:56, 2 January 2010

Overview

The Application Context is a global object available from your Handler Object. Using the Application Context object, you can access various application information, dialog boxes, and user preferences.

From your Zimlet Handler Object, you can access the appCtxt object. For example, the following shows how to access the simple message dialog from the application context:

com_zimbra_test.prototype.myMethod = 
function() {
  var dialog = appCtxt.getMsgDialog(); //get a simple message dialog

  dialog.reset(); // reset the dialog
  dialog.setMessage("Hello World!", DwtMessageDialog.INFO_STYLE); // set the message "info" style
  dialog.popup(); // display the dialog

};

API Documentation

JavaScript documentation for the Application Context class is available at:

http://files.zimbra.com/docs/zimlet/zcs/6.0/jsdocs/symbols/ZmAppCtxt.html

Jump to: navigation, search