<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.open-xchange.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Plugin_API</id>
	<title>Plugin API - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.open-xchange.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Plugin_API"/>
	<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;action=history"/>
	<updated>2026-06-30T22:42:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=22094&amp;oldid=prev</id>
		<title>Martin.schneider: Move to https://documentation.open-xchange.com/</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=22094&amp;oldid=prev"/>
		<updated>2016-06-29T13:52:42Z</updated>

		<summary type="html">&lt;p&gt;Move to https://documentation.open-xchange.com/&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:52, 29 June 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To install the plugin, the directory which contains the &amp;lt;code&amp;gt;register.js&amp;lt;/code&amp;gt; file is copied to the server into the &amp;lt;code&amp;gt;plugins&amp;lt;/code&amp;gt; subdirectory of the GUI installation. For example, if the GUI is installed in &amp;lt;code&amp;gt;/var/www/&amp;lt;/code&amp;gt;, then the plugin code will end up in &amp;lt;code&amp;gt;/var/www/plugins/com.example.test/register.js&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To install the plugin, the directory which contains the &amp;lt;code&amp;gt;register.js&amp;lt;/code&amp;gt; file is copied to the server into the &amp;lt;code&amp;gt;plugins&amp;lt;/code&amp;gt; subdirectory of the GUI installation. For example, if the GUI is installed in &amp;lt;code&amp;gt;/var/www/&amp;lt;/code&amp;gt;, then the plugin code will end up in &amp;lt;code&amp;gt;/var/www/plugins/com.example.test/register.js&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To enable the installed plugin, the GUI [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;HTTP API&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#&lt;/del&gt;Module &amp;quot;config&amp;quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|configuration]&lt;/del&gt;] provided by the server must contain an entry for the plugin. This can be accomplished either dynamically (e. g. per-user or per-context) by an OSGi bundle, or statically in a configuration file. We will use the latter method to enable the plugin for testing. The GUI configuration entry is added through a Java properties file in the &amp;lt;code&amp;gt;settings&amp;lt;/code&amp;gt; subdirectory of the application server's configuration directory. Usually, this will be &amp;lt;code&amp;gt;/opt/openexchange/etc/groupware/settings/&amp;lt;/code&amp;gt;. To avoid conflicts with configuration files for other plugins, again, the unique name of the plugin should be used together with the &amp;lt;code&amp;gt;.properties&amp;lt;/code&amp;gt; file extension, e. g. &amp;lt;code&amp;gt;com.example.test.properties&amp;lt;/code&amp;gt;. This file can now be used to add arbitrary entries to the GUI configuration by specifying the full path (separated by slashes) as the key and the value for each leaf configuration node as the value of a property. Inner nodes of the configuration tree don't need to be specified explicitly, they have no own values and are created automatically.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To enable the installed plugin, the GUI &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;configuration &lt;/ins&gt;[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https://documentation.open-xchange.com/ &lt;/ins&gt;HTTP API &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(&lt;/ins&gt;Module &amp;quot;config&amp;quot;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;] provided by the server must contain an entry for the plugin. This can be accomplished either dynamically (e. g. per-user or per-context) by an OSGi bundle, or statically in a configuration file. We will use the latter method to enable the plugin for testing. The GUI configuration entry is added through a Java properties file in the &amp;lt;code&amp;gt;settings&amp;lt;/code&amp;gt; subdirectory of the application server's configuration directory. Usually, this will be &amp;lt;code&amp;gt;/opt/openexchange/etc/groupware/settings/&amp;lt;/code&amp;gt;. To avoid conflicts with configuration files for other plugins, again, the unique name of the plugin should be used together with the &amp;lt;code&amp;gt;.properties&amp;lt;/code&amp;gt; file extension, e. g. &amp;lt;code&amp;gt;com.example.test.properties&amp;lt;/code&amp;gt;. This file can now be used to add arbitrary entries to the GUI configuration by specifying the full path (separated by slashes) as the key and the value for each leaf configuration node as the value of a property. Inner nodes of the configuration tree don't need to be specified explicitly, they have no own values and are created automatically.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The node required to enable the plugin must be a direct child of the node &amp;lt;code&amp;gt;modules&amp;lt;/code&amp;gt; and have the same name as the plugin. The plugin is enabled if this node itself has children, or if its value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. Since our plugin doesn't need any other settings yet, we use the latter variant:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The node required to enable the plugin must be a direct child of the node &amp;lt;code&amp;gt;modules&amp;lt;/code&amp;gt; and have the same name as the plugin. The plugin is enabled if this node itself has children, or if its value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. Since our plugin doesn't need any other settings yet, we use the latter variant:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l143&quot;&gt;Line 143:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 143:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the example above, the parameters are passed unmodified to the static method &amp;lt;code&amp;gt;ox.JSON.put&amp;lt;/code&amp;gt;, which encodes the data as [http://json.org/ JSON] and sends it via an HTTP PUT request to the specified URL. Static methods for GET and POST requests are also available. The URL is constructed from the global variable &amp;lt;code&amp;gt;AjaxRoot&amp;lt;/code&amp;gt;, which specifies the path of the Open-Xchange application server (usually &amp;lt;code&amp;gt;/ajax&amp;lt;/code&amp;gt;), the name of a hypothetical Java servlet, and URL parameters which depend on the servlet. The URL parameter &amp;lt;code&amp;gt;session&amp;lt;/code&amp;gt; should be present in every servlet request and contain the value of the global variable of the same name. This parameter is used to protect against [http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF] attacks.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In the example above, the parameters are passed unmodified to the static method &amp;lt;code&amp;gt;ox.JSON.put&amp;lt;/code&amp;gt;, which encodes the data as [http://json.org/ JSON] and sends it via an HTTP PUT request to the specified URL. Static methods for GET and POST requests are also available. The URL is constructed from the global variable &amp;lt;code&amp;gt;AjaxRoot&amp;lt;/code&amp;gt;, which specifies the path of the Open-Xchange application server (usually &amp;lt;code&amp;gt;/ajax&amp;lt;/code&amp;gt;), the name of a hypothetical Java servlet, and URL parameters which depend on the servlet. The URL parameter &amp;lt;code&amp;gt;session&amp;lt;/code&amp;gt; should be present in every servlet request and contain the value of the global variable of the same name. This parameter is used to protect against [http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF] attacks.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The reply from the server should conform to the general rules of the [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;HTTP API&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]&lt;/del&gt;], in particular, the error handling. If there are no errors, the reply is decoded and passed as an object to the specified callback function. In our case, that callback function is &amp;lt;code&amp;gt;cont&amp;lt;/code&amp;gt;, which ignores any parameters and merely updates some internal state. If there are errors, the callback is not called. Instead, the error is decoded and displayed by default. If, as in the above example, a second callback function is specified as the optional fourth parameter to &amp;lt;code&amp;gt;ox.JSON.put&amp;lt;/code&amp;gt; then it is called and given a chance to handle the error before or instead of displaying it. For our example this function handles the inevitable error which will occur when we try to access the non-existent servlet at &amp;lt;code&amp;gt;/ajax/com.example.test&amp;lt;/code&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The reply from the server should conform to the general rules of the [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https://documentation.open-xchange.com/ &lt;/ins&gt;HTTP API], in particular, the error handling. If there are no errors, the reply is decoded and passed as an object to the specified callback function. In our case, that callback function is &amp;lt;code&amp;gt;cont&amp;lt;/code&amp;gt;, which ignores any parameters and merely updates some internal state. If there are errors, the callback is not called. Instead, the error is decoded and displayed by default. If, as in the above example, a second callback function is specified as the optional fourth parameter to &amp;lt;code&amp;gt;ox.JSON.put&amp;lt;/code&amp;gt; then it is called and given a chance to handle the error before or instead of displaying it. For our example this function handles the inevitable error which will occur when we try to access the non-existent servlet at &amp;lt;code&amp;gt;/ajax/com.example.test&amp;lt;/code&amp;gt;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  '''function''' handleErrors(result, status) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  '''function''' handleErrors(result, status) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l152&quot;&gt;Line 152:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 152:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are two slightly different cases in which the error callback is called. When the server returns a properly formatted JSON reply with an error field as described in [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[&lt;/del&gt;HTTP_API&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#Error_handling]&lt;/del&gt;], the callback is called with the object which represents the entire server reply as the only parameter. When the server returns an HTTP status code other than 200, the error callback is called with the status text as the first parameter and the status code as the second parameter. In both cases, the error handler can return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to prevent the default error handling from displaying the error message. This is exactly what the &amp;lt;code&amp;gt;handleErrors&amp;lt;/code&amp;gt; function does when the server returns an HTTP status 404 (&amp;quot;Not Found&amp;quot;) or 405 (&amp;quot;Method Not Allowed&amp;quot;). As a general rule, error callbacks should only return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for specific known cases, and let the default error handling process any unknown errors.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are two slightly different cases in which the error callback is called. When the server returns a properly formatted JSON reply with an error field as described in [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https://documentation.open-xchange.com/ &lt;/ins&gt;HTTP_API &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(Error handling)&lt;/ins&gt;], the callback is called with the object which represents the entire server reply as the only parameter. When the server returns an HTTP status code other than 200, the error callback is called with the status text as the first parameter and the status code as the second parameter. In both cases, the error handler can return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to prevent the default error handling from displaying the error message. This is exactly what the &amp;lt;code&amp;gt;handleErrors&amp;lt;/code&amp;gt; function does when the server returns an HTTP status 404 (&amp;quot;Not Found&amp;quot;) or 405 (&amp;quot;Method Not Allowed&amp;quot;). As a general rule, error callbacks should only return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for specific known cases, and let the default error handling process any unknown errors.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Besides uploading of entered settings, a typical configuration page will need to display the currently active settings. These can be displayed by overriding the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method of the page:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Besides uploading of entered settings, a typical configuration page will need to display the currently active settings. These can be displayed by overriding the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method of the page:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Martin.schneider</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=15173&amp;oldid=prev</id>
		<title>Tierlieb at 10:23, 5 August 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=15173&amp;oldid=prev"/>
		<updated>2013-08-05T10:23:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:23, 5 August 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Open-Xchange plugin API is a set of JavaScript objects and classes which can be used to extend the Open-Xchange GUI. The API is very new and still growing. Suggestions about desired functionality are always welcome on the [[API Suggestions]] page. As the API evolves, certain interfaces may change or be replaced by newer ones. When this happens, the old interfaces will be marked as &amp;quot;deprecated&amp;quot;, but will continue to work long enough to allow all affected code to be updated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Open-Xchange plugin API is a set of JavaScript objects and classes which can be used to extend the Open-Xchange GUI. The API is very new and still growing. Suggestions about desired functionality are always welcome on the [[API Suggestions]] page. As the API evolves, certain interfaces may change or be replaced by newer ones. When this happens, the old interfaces will be marked as &amp;quot;deprecated&amp;quot;, but will continue to work long enough to allow all affected code to be updated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A reference of all currently available classes and functions of the plugin API is available at [[Main_Page_AppSuite#Programming_Interfaces]]. The reference for any other version since Service Pack 5 can be created by checking out the corresponding GUI source code from CVS and executing the &amp;lt;code&amp;gt;jsdoc&amp;lt;/code&amp;gt; Ant target in the top directory of the GUI source. The documentation is then placed in the directory &amp;lt;code&amp;gt;sdk/jsdoc&amp;lt;/code&amp;gt; by default, but the location can be changed by defining the Ant property &amp;lt;code&amp;gt;jsdoc.dir&amp;lt;/code&amp;gt; on the command line.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A reference of all currently available classes and functions of the plugin API is available at [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Main_Page_HESE#Programming_Interfaces|Programming interfaces (OX6)]] and [[AppSuite:&lt;/ins&gt;Main_Page_AppSuite#Programming_Interfaces&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|Programming Interfaces (AppSuite)&lt;/ins&gt;]]. The reference for any other version since Service Pack 5 can be created by checking out the corresponding GUI source code from CVS and executing the &amp;lt;code&amp;gt;jsdoc&amp;lt;/code&amp;gt; Ant target in the top directory of the GUI source. The documentation is then placed in the directory &amp;lt;code&amp;gt;sdk/jsdoc&amp;lt;/code&amp;gt; by default, but the location can be changed by defining the Ant property &amp;lt;code&amp;gt;jsdoc.dir&amp;lt;/code&amp;gt; on the command line.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page complements the API reference as a guide to the creation of a GUI plugin. It starts with a description of a mininmal plugin, which is then expanded with examples of various API functionality.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page complements the API reference as a guide to the creation of a GUI plugin. It starts with a description of a mininmal plugin, which is then expanded with examples of various API functionality.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tierlieb</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=15172&amp;oldid=prev</id>
		<title>Tierlieb at 10:19, 5 August 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=15172&amp;oldid=prev"/>
		<updated>2013-08-05T10:19:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:19, 5 August 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Open-Xchange plugin API is a set of JavaScript objects and classes which can be used to extend the Open-Xchange GUI. The API is very new and still growing. Suggestions about desired functionality are always welcome on the [[API Suggestions]] page. As the API evolves, certain interfaces may change or be replaced by newer ones. When this happens, the old interfaces will be marked as &amp;quot;deprecated&amp;quot;, but will continue to work long enough to allow all affected code to be updated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The Open-Xchange plugin API is a set of JavaScript objects and classes which can be used to extend the Open-Xchange GUI. The API is very new and still growing. Suggestions about desired functionality are always welcome on the [[API Suggestions]] page. As the API evolves, certain interfaces may change or be replaced by newer ones. When this happens, the old interfaces will be marked as &amp;quot;deprecated&amp;quot;, but will continue to work long enough to allow all affected code to be updated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A reference of all currently available classes and functions of the plugin API is available at [[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Main Page&lt;/del&gt;#&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Interfaces&lt;/del&gt;]]. The reference for any other version since Service Pack 5 can be created by checking out the corresponding GUI source code from CVS and executing the &amp;lt;code&amp;gt;jsdoc&amp;lt;/code&amp;gt; Ant target in the top directory of the GUI source. The documentation is then placed in the directory &amp;lt;code&amp;gt;sdk/jsdoc&amp;lt;/code&amp;gt; by default, but the location can be changed by defining the Ant property &amp;lt;code&amp;gt;jsdoc.dir&amp;lt;/code&amp;gt; on the command line.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A reference of all currently available classes and functions of the plugin API is available at [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Main_Page_AppSuite&lt;/ins&gt;#&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Programming_Interfaces&lt;/ins&gt;]]. The reference for any other version since Service Pack 5 can be created by checking out the corresponding GUI source code from CVS and executing the &amp;lt;code&amp;gt;jsdoc&amp;lt;/code&amp;gt; Ant target in the top directory of the GUI source. The documentation is then placed in the directory &amp;lt;code&amp;gt;sdk/jsdoc&amp;lt;/code&amp;gt; by default, but the location can be changed by defining the Ant property &amp;lt;code&amp;gt;jsdoc.dir&amp;lt;/code&amp;gt; on the command line.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page complements the API reference as a guide to the creation of a GUI plugin. It starts with a description of a mininmal plugin, which is then expanded with examples of various API functionality.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This page complements the API reference as a guide to the creation of a GUI plugin. It starts with a description of a mininmal plugin, which is then expanded with examples of various API functionality.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tierlieb</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=5148&amp;oldid=prev</id>
		<title>Viktor.Pracht: /* Widgets */</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=5148&amp;oldid=prev"/>
		<updated>2009-11-30T14:55:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Widgets&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:55, 30 November 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l117&quot;&gt;Line 117:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 117:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The code to add widgets is placed in the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; method of the configuration page. This method is called before the page is displayed for the first time. This is the preferred place to add widgets and perform other initialization, instead of the body of the plugin.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The code to add widgets is placed in the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; method of the configuration page. This method is called before the page is displayed for the first time. This is the preferred place to add widgets and perform other initialization, instead of the body of the plugin.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  page.init = function() {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  page.init = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'''&lt;/ins&gt;function&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'''&lt;/ins&gt;() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Input(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Mail address&amp;quot;&amp;lt;/span&amp;gt;)), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;email&amp;quot;&amp;lt;/span&amp;gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Input(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Mail address&amp;quot;&amp;lt;/span&amp;gt;)), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;email&amp;quot;&amp;lt;/span&amp;gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Password(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Password&amp;quot;&amp;lt;/span&amp;gt;)), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;password&amp;quot;&amp;lt;/span&amp;gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Password(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Password&amp;quot;&amp;lt;/span&amp;gt;)), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;password&amp;quot;&amp;lt;/span&amp;gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Viktor.Pracht</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=4057&amp;oldid=prev</id>
		<title>Mheiland at 13:17, 27 June 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=4057&amp;oldid=prev"/>
		<updated>2009-06-27T13:17:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:17, 27 June 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l162&quot;&gt;Line 162:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 162:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similar to the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; method, the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method takes a continuation function as parameter. The difference is that, this time, the data travels in the other direction: instead of getting the data ''from'' the plugin API as a parameter, the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method must pass the data as parameter ''to'' the plugin API's continuation function. In most cases, the reply received from the server will not be structured exactly like the data object defined by &amp;lt;code&amp;gt;addWidget&amp;lt;/code&amp;gt; calls. Therefore, the continuation function can't be passed directly to &amp;lt;code&amp;gt;ox.JSON.get&amp;lt;/code&amp;gt; like in the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; method. Instead, an anonymous function is used to extract the data object from its &amp;lt;code&amp;gt;reply&amp;lt;/code&amp;gt; parameter and call the continuation function with the extracted data as parameter. The function does not need to be anonymous, but it must be defined inside of the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method, to have access to &amp;lt;code&amp;gt;cont&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Similar to the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; method, the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method takes a continuation function as parameter. The difference is that, this time, the data travels in the other direction: instead of getting the data ''from'' the plugin API as a parameter, the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method must pass the data as parameter ''to'' the plugin API's continuation function. In most cases, the reply received from the server will not be structured exactly like the data object defined by &amp;lt;code&amp;gt;addWidget&amp;lt;/code&amp;gt; calls. Therefore, the continuation function can't be passed directly to &amp;lt;code&amp;gt;ox.JSON.get&amp;lt;/code&amp;gt; like in the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; method. Instead, an anonymous function is used to extract the data object from its &amp;lt;code&amp;gt;reply&amp;lt;/code&amp;gt; parameter and call the continuation function with the extracted data as parameter. The function does not need to be anonymous, but it must be defined inside of the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method, to have access to &amp;lt;code&amp;gt;cont&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category: OX6]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mheiland</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2908&amp;oldid=prev</id>
		<title>Viktor.Pracht: /* Widgets */</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2908&amp;oldid=prev"/>
		<updated>2009-01-26T08:55:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Widgets&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:55, 26 January 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l118&quot;&gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  page.init = function() {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  page.init = function() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Input(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Mail address&amp;quot;&amp;lt;/span&amp;gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;email&amp;quot;&amp;lt;/span&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/del&gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Input(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Mail address&amp;quot;&amp;lt;/span&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;email&amp;quot;&amp;lt;/span&amp;gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Password(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Password&amp;quot;&amp;lt;/span&amp;gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;password&amp;quot;&amp;lt;/span&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/del&gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Password(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Password&amp;quot;&amp;lt;/span&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;password&amp;quot;&amp;lt;/span&amp;gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  };&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  };&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Viktor.Pracht</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2907&amp;oldid=prev</id>
		<title>DerCisco: /* Widgets */</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2907&amp;oldid=prev"/>
		<updated>2009-01-25T23:49:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Widgets&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:49, 25 January 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l118&quot;&gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  page.init = function() {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  page.init = function() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Input(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Mail address&amp;quot;&amp;lt;/span&amp;gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;email&amp;quot;&amp;lt;/span&amp;gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Input(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Mail address&amp;quot;&amp;lt;/span&amp;gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;email&amp;quot;&amp;lt;/span&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Password(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Password&amp;quot;&amp;lt;/span&amp;gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;password&amp;quot;&amp;lt;/span&amp;gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      page.addWidget('''new''' ox.UI.Password(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Password&amp;quot;&amp;lt;/span&amp;gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;password&amp;quot;&amp;lt;/span&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  };&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  };&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>DerCisco</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2805&amp;oldid=prev</id>
		<title>Viktor.Pracht: /* Translation */ typo</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2805&amp;oldid=prev"/>
		<updated>2009-01-12T12:44:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Translation: &lt;/span&gt; typo&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:44, 12 January 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l65&quot;&gt;Line 65:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;span style=&amp;quot;color: #080&amp;quot;&amp;gt;&amp;amp;lt;property&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #800&amp;quot;&amp;gt;name&amp;lt;/span&amp;gt;=&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;name&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #800&amp;quot;&amp;gt;value&amp;lt;/span&amp;gt;=&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;''com.example.test''&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: #080&amp;quot;&amp;gt;/&amp;amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &amp;lt;span style=&amp;quot;color: #080&amp;quot;&amp;gt;&amp;amp;lt;property&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #800&amp;quot;&amp;gt;name&amp;lt;/span&amp;gt;=&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;name&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #800&amp;quot;&amp;gt;value&amp;lt;/span&amp;gt;=&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;''com.example.test''&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: #080&amp;quot;&amp;gt;/&amp;amp;gt;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After running Ant in the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;prugin &lt;/del&gt;directory, the newly created directory named &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; should contain the translation template &amp;lt;code&amp;gt;com.example.test.pot&amp;lt;/code&amp;gt; which looks like this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After running Ant in the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;plugin &lt;/ins&gt;directory, the newly created directory named &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; should contain the translation template &amp;lt;code&amp;gt;com.example.test.pot&amp;lt;/code&amp;gt; which looks like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;&amp;quot;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;&amp;quot;&amp;lt;/span&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Viktor.Pracht</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2752&amp;oldid=prev</id>
		<title>Viktor.Pracht: /* Communication with the server */</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2752&amp;oldid=prev"/>
		<updated>2008-12-10T08:14:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Communication with the server&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 08:14, 10 December 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l152&quot;&gt;Line 152:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 152:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are two slightly different cases in which the error callback is called. When the server returns a properly formatted JSON reply with an error field as described in [[HTTP_API#Error_handling]], the callback is called with the object which represents the entire server reply as the only parameter. When the server returns an HTTP status code other than 200, the error callback is called with the status text as the first parameter and the status code as the second parameter. In both cases, the error handler can return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to prevent the default error handling from displaying the error message. This is exactly what the &amp;lt;code&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;handle404&lt;/del&gt;&amp;lt;/code&amp;gt; function does when the server returns an HTTP status 404 (&amp;quot;Not Found&amp;quot;) or 405 (&amp;quot;Method Not Allowed&amp;quot;). As a general rule, error callbacks should only return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for specific known cases, and let the default error handling process any unknown errors.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There are two slightly different cases in which the error callback is called. When the server returns a properly formatted JSON reply with an error field as described in [[HTTP_API#Error_handling]], the callback is called with the object which represents the entire server reply as the only parameter. When the server returns an HTTP status code other than 200, the error callback is called with the status text as the first parameter and the status code as the second parameter. In both cases, the error handler can return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to prevent the default error handling from displaying the error message. This is exactly what the &amp;lt;code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;handleErrors&lt;/ins&gt;&amp;lt;/code&amp;gt; function does when the server returns an HTTP status 404 (&amp;quot;Not Found&amp;quot;) or 405 (&amp;quot;Method Not Allowed&amp;quot;). As a general rule, error callbacks should only return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for specific known cases, and let the default error handling process any unknown errors.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Besides uploading of entered settings, a typical configuration page will need to display the currently active settings. These can be displayed by overriding the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method of the page:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Besides uploading of entered settings, a typical configuration page will need to display the currently active settings. These can be displayed by overriding the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method of the page:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Viktor.Pracht</name></author>
	</entry>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2751&amp;oldid=prev</id>
		<title>Viktor.Pracht: Initial import</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Plugin_API&amp;diff=2751&amp;oldid=prev"/>
		<updated>2008-12-09T17:58:48Z</updated>

		<summary type="html">&lt;p&gt;Initial import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The Open-Xchange plugin API is a set of JavaScript objects and classes which can be used to extend the Open-Xchange GUI. The API is very new and still growing. Suggestions about desired functionality are always welcome on the [[API Suggestions]] page. As the API evolves, certain interfaces may change or be replaced by newer ones. When this happens, the old interfaces will be marked as &amp;quot;deprecated&amp;quot;, but will continue to work long enough to allow all affected code to be updated.&lt;br /&gt;
&lt;br /&gt;
A reference of all currently available classes and functions of the plugin API is available at [[Main Page#Interfaces]]. The reference for any other version since Service Pack 5 can be created by checking out the corresponding GUI source code from CVS and executing the &amp;lt;code&amp;gt;jsdoc&amp;lt;/code&amp;gt; Ant target in the top directory of the GUI source. The documentation is then placed in the directory &amp;lt;code&amp;gt;sdk/jsdoc&amp;lt;/code&amp;gt; by default, but the location can be changed by defining the Ant property &amp;lt;code&amp;gt;jsdoc.dir&amp;lt;/code&amp;gt; on the command line.&lt;br /&gt;
&lt;br /&gt;
This page complements the API reference as a guide to the creation of a GUI plugin. It starts with a description of a mininmal plugin, which is then expanded with examples of various API functionality.&lt;br /&gt;
&lt;br /&gt;
== Hello, World! ==&lt;br /&gt;
&lt;br /&gt;
First of all, every plugin needs a unique name. This name will be used in many places to avoid conflicts with other plugins which may be installed on the same server. The simplest way to come up with a unique name is to pick any name and prefix it with a domain name you control. The individual parts of the domain should be reversed like in Java (and other languages) package names. If we pick the canonical example domain &amp;lt;code&amp;gt;example.com&amp;lt;/code&amp;gt; and name our plugin &amp;quot;test&amp;quot;, then its unique name would be &amp;lt;code&amp;gt;com.example.test&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After choosing a name, we can start creating the actual plugin. The entire plugin must be contained in a single directory, which has the same name as the plugin. This directory will be installed on the server, and is the first example where the name must be unique to avoid overwriting other people's plugins.&lt;br /&gt;
&lt;br /&gt;
The entire JavaScript source code for the plugin must be put in a file called &amp;lt;code&amp;gt;register.js&amp;lt;/code&amp;gt;. This file is loaded and executed when the GUI is initialized after the user logs in. The primary task of this file is to register the plugin and hook it up inside the GUI.&lt;br /&gt;
&lt;br /&gt;
For the first plugin, we only want to see when our code gets executed. For this, a simple alert will do:&lt;br /&gt;
&lt;br /&gt;
 alert(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Hello, World!&amp;quot;&amp;lt;/span&amp;gt;);&lt;br /&gt;
&lt;br /&gt;
That's it! The absolutely minimal plugin is done and ready to be installed.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
To install the plugin, the directory which contains the &amp;lt;code&amp;gt;register.js&amp;lt;/code&amp;gt; file is copied to the server into the &amp;lt;code&amp;gt;plugins&amp;lt;/code&amp;gt; subdirectory of the GUI installation. For example, if the GUI is installed in &amp;lt;code&amp;gt;/var/www/&amp;lt;/code&amp;gt;, then the plugin code will end up in &amp;lt;code&amp;gt;/var/www/plugins/com.example.test/register.js&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To enable the installed plugin, the GUI [[HTTP API#Module &amp;quot;config&amp;quot;|configuration]] provided by the server must contain an entry for the plugin. This can be accomplished either dynamically (e. g. per-user or per-context) by an OSGi bundle, or statically in a configuration file. We will use the latter method to enable the plugin for testing. The GUI configuration entry is added through a Java properties file in the &amp;lt;code&amp;gt;settings&amp;lt;/code&amp;gt; subdirectory of the application server's configuration directory. Usually, this will be &amp;lt;code&amp;gt;/opt/openexchange/etc/groupware/settings/&amp;lt;/code&amp;gt;. To avoid conflicts with configuration files for other plugins, again, the unique name of the plugin should be used together with the &amp;lt;code&amp;gt;.properties&amp;lt;/code&amp;gt; file extension, e. g. &amp;lt;code&amp;gt;com.example.test.properties&amp;lt;/code&amp;gt;. This file can now be used to add arbitrary entries to the GUI configuration by specifying the full path (separated by slashes) as the key and the value for each leaf configuration node as the value of a property. Inner nodes of the configuration tree don't need to be specified explicitly, they have no own values and are created automatically.&lt;br /&gt;
&lt;br /&gt;
The node required to enable the plugin must be a direct child of the node &amp;lt;code&amp;gt;modules&amp;lt;/code&amp;gt; and have the same name as the plugin. The plugin is enabled if this node itself has children, or if its value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. Since our plugin doesn't need any other settings yet, we use the latter variant:&lt;br /&gt;
&lt;br /&gt;
 modules/com.example.test = true&lt;br /&gt;
&lt;br /&gt;
After (re)starting the server and logging in, the alert pop-up appears when the plugin is initialized. Since the initialization of all plugins happens immediately after logging in, plugins should perform only the minimum necessary initialization directly in &amp;lt;code&amp;gt;register.js&amp;lt;/code&amp;gt;, and do the rest in some callback, e. g. when the user first interacts with the plugin.&lt;br /&gt;
&lt;br /&gt;
== Configuration tree ==&lt;br /&gt;
&lt;br /&gt;
After the plugin itself works, we can add some real functionality to it. Currently, the only place where plugins are supported is the configuration area. There one can add nodes to the configuration tree on the left, and add pages which are displayed when a node is clicked. Nodes can be added directly to the root node of the tree, or to other inner nodes, which look like folders. New inner nodes can also be added. While multiple levels of inner nodes would work, is it discouraged because of too many clicks a user would have to perform to get to the actual configuration pages.&lt;br /&gt;
&lt;br /&gt;
First, we add an inner node named &amp;quot;Example&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 '''new''' ox.Configuration.InnerNode(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;configuration/com.example.test&amp;quot;&amp;lt;/span&amp;gt;, _(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Example&amp;quot;&amp;lt;/span&amp;gt;));&lt;br /&gt;
&lt;br /&gt;
The above line replaces the &amp;lt;code&amp;gt;alert&amp;lt;/code&amp;gt; statement of the &amp;quot;Hello, World!&amp;quot; plugin. After reloading the GUI and clicking on the configuration module, there should be a new entry in the configuration tree. If the alert still appears, the browser cache must be cleared before reloading the GUI, or even better, the Apache module &amp;lt;code&amp;gt;mod_expires&amp;lt;/code&amp;gt; should be disabled at least for the directory of the plugin.&lt;br /&gt;
&lt;br /&gt;
The constructor of the class &amp;lt;code&amp;gt;ox.Configuration.InnerNode&amp;lt;/code&amp;gt; does all the work of creating the node object and adding it to the configuration tree. It accepts two parameters: the path and the name of the new node. The path of the node is similar to a file path in a directory tree. It specifies the location of the node as a list of path elements, separated by slashes. The root configuration node is called &amp;lt;code&amp;gt;configuration&amp;lt;/code&amp;gt;. For the next level, plugins should use their unique name to avoid conflicts. If present, the last level can contain any strings, since it is usually defined by the plugin which created the second level.&lt;br /&gt;
&lt;br /&gt;
The second parameter, the name of the node, is a user-visible string which must be translated to the user's current language. The translation is performed by the function called &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt; (that is, a single underscore). It is the same name as used by the [http://www.gnu.org/software/gettext/ GNU gettext] tools. Most other functions like &amp;lt;code&amp;gt;ngettext&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pgettext&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;npgettext&amp;lt;/code&amp;gt; are also available.&lt;br /&gt;
&lt;br /&gt;
Similar to inner nodes, leaf nodes are added by creating an object of the class &amp;lt;code&amp;gt;ox.Configuration.LeafNode&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 '''var''' node = '''new''' ox.Configuration.LeafNode(&lt;br /&gt;
     &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;configuration/com.example.test/account&amp;quot;&amp;lt;/span&amp;gt;, _(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Account&amp;quot;&amp;lt;/span&amp;gt;));&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;LeafNode&amp;lt;/code&amp;gt; constructor takes the same parameters as the &amp;lt;code&amp;gt;InnerNode&amp;lt;/code&amp;gt; constructor. This time, the created object is stored in the variable &amp;lt;code&amp;gt;node&amp;lt;/code&amp;gt; because we still need it to add a page which is opened when the node is activated:&lt;br /&gt;
&lt;br /&gt;
 '''var''' page = '''new''' ox.Configuration.Page(node, _(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Account settings&amp;quot;&amp;lt;/span&amp;gt;));&lt;br /&gt;
&lt;br /&gt;
The first parameter is the previously created inner node. The second parameter is the page title which is displayed at the top of the new page:&lt;br /&gt;
&lt;br /&gt;
[[Image:PluginAPIEmptyPage.png|center|Test page]]&lt;br /&gt;
&lt;br /&gt;
== Translation ==&lt;br /&gt;
&lt;br /&gt;
So far, all displayed text of the plugin is always in English. The translation into every desired language must first be provided by a translator. This is done using the Portable Object (&amp;lt;code&amp;gt;.po&amp;lt;/code&amp;gt;) file format also used by GNU gettext. First, a PO template (&amp;lt;code&amp;gt;.pot&amp;lt;/code&amp;gt;) file needs to be created. This can be done automatically via the Ant build script provided in the &amp;lt;code&amp;gt;sdk&amp;lt;/code&amp;gt; directory of the GUI source code. The script should be copied to the plugin directory and modified by inserting the name of the plugin in the following line near the start of the file:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #888&amp;quot;&amp;gt;&amp;amp;lt;!-- Plugin name --&amp;amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #080&amp;quot;&amp;gt;&amp;amp;lt;property&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #800&amp;quot;&amp;gt;name&amp;lt;/span&amp;gt;=&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;name&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color: #800&amp;quot;&amp;gt;value&amp;lt;/span&amp;gt;=&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;''com.example.test''&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: #080&amp;quot;&amp;gt;/&amp;amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running Ant in the prugin directory, the newly created directory named &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; should contain the translation template &amp;lt;code&amp;gt;com.example.test.pot&amp;lt;/code&amp;gt; which looks like this:&lt;br /&gt;
&lt;br /&gt;
 '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 '''msgstr''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Project-Id-Version: NAME&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;POT-Creation-Date: 2009-01-01 12:34+0100&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;PO-Revision-Date: DATE&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Last-Translator: NAME &amp;lt;span style=&amp;quot;color: #080&amp;quot;&amp;gt;&amp;amp;lt;EMAIL&amp;amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Language-Team: NAME &amp;lt;span style=&amp;quot;color: #080&amp;quot;&amp;gt;&amp;amp;lt;EMAIL&amp;amp;gt;&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;MIME-Version: 1.0&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Content-Type: text/plain; charset=UTF-8&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Content-Transfer-Encoding: 8bit&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Example&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 '''msgstr''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Account&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 '''msgstr''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Account settings&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 '''msgstr''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This file can be opened in a dedicated tool like [http://kbabel.kde.org KBabel] or [http://www.poedit.net/ Poedit], or in a simple text editor as long as it supports UTF-8. The translation of each &amp;lt;code&amp;gt;msgid&amp;lt;/code&amp;gt; text is stored as the corresponding &amp;lt;code&amp;gt;msgstr&amp;lt;/code&amp;gt; text. A German translation could look like this:&lt;br /&gt;
&lt;br /&gt;
 '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Example&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 '''msgstr''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Beispiel&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Account&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 '''msgstr''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Benutzerkonto&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 '''msgid''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Account settings&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
 '''msgstr''' &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Kontoeinstellungen&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first &amp;lt;code&amp;gt;msgid&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;msgstr&amp;lt;/code&amp;gt; pair is a special case. It contains an empty text as &amp;lt;code&amp;gt;msgid&amp;lt;/code&amp;gt; and a header with meta-information as &amp;lt;code&amp;gt;msgstr&amp;lt;/code&amp;gt;. This information is useful for maintaining multiple versions of multiple translations. The only entry which influences the actual translation is the last one, &amp;lt;code&amp;gt;Plural-Forms&amp;lt;/code&amp;gt;. It specifies how to translate text which contains numbers. Unlike with the original GNU gettext tools, this entry is currently ''not'' optional in &amp;lt;code&amp;gt;.po&amp;lt;/code&amp;gt; files used in the Open-Xchange GUI. The two placeholders &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;EXPRESSION&amp;lt;/code&amp;gt; must be replaced with the number of plural forms and a rule for selecting the correct plural form for a number, respectively. A list of these values for most languages can be found in the [http://www.gnu.org/software/automake/manual/gettext/Plural-forms.html#index-plural-form-formulas-1059 GNU gettext manual]. For German this line would look like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Plural-Forms: nplurals=2; plural=n != 1;&amp;lt;span style=&amp;quot;color: #808&amp;quot;&amp;gt;\n&amp;lt;/span&amp;gt;&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The translated file must be saved in the &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; directory with the language ID as file name and &amp;lt;code&amp;gt;.po&amp;lt;/code&amp;gt; as extension, e. g. &amp;lt;code&amp;gt;de_DE.po&amp;lt;/code&amp;gt; for the German translation. The language ID usually consists of a lowercase two-letter language code and an uppercase two-letter country code, separated by an underscore.&lt;br /&gt;
&lt;br /&gt;
After saving the translated file and reloading the GUI, the configuration page of our plugin should appear translated when a translation for the current language is available, and appear in English when a translation could not be found.&lt;br /&gt;
&lt;br /&gt;
Whenever new user-visible strings are added to the plugin, the build script should be re-run to create an updated PO template, which can then be ''merged'' with the existing translations to include the new untranslated strings without throwing away the existing translations. The merging can be done either in one of the PO editors, or manually with the &amp;lt;code&amp;gt;msgmerge&amp;lt;/code&amp;gt; tool:&lt;br /&gt;
&lt;br /&gt;
 msgmerge -U lang/de_DE.po lang/com.example.test.pot&lt;br /&gt;
&lt;br /&gt;
== Widgets ==&lt;br /&gt;
&lt;br /&gt;
To do anything useful, our new configuration page needs some widgets. A widget is, in general, any visible UI element like an input field or a button. All widgets have some common methods and properties, which are defined in the abstract class &amp;lt;code&amp;gt;ox.UI.Widget&amp;lt;/code&amp;gt;. Concrete widgets are members of direct or indirect subclasses of &amp;lt;code&amp;gt;ox.UI.Widget&amp;lt;/code&amp;gt;. Intermediate subclasses add common functionality which is useful for many, but not all widgets. For example, &amp;lt;code&amp;gt;ox.UI.Container&amp;lt;/code&amp;gt; adds the ability to contain other widgets. Our configuration page is a subclasses of &amp;lt;code&amp;gt;ox.UI.Container&amp;lt;/code&amp;gt; and therefore we can add other widgets to it using the &amp;lt;code&amp;gt;addWidget&amp;lt;/code&amp;gt; method, which it inherits from &amp;lt;code&amp;gt;ox.UI.Container&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The code to add widgets is placed in the &amp;lt;code&amp;gt;init&amp;lt;/code&amp;gt; method of the configuration page. This method is called before the page is displayed for the first time. This is the preferred place to add widgets and perform other initialization, instead of the body of the plugin.&lt;br /&gt;
&lt;br /&gt;
 page.init = function() {&lt;br /&gt;
     page.addWidget('''new''' ox.UI.Input(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Mail address&amp;quot;&amp;lt;/span&amp;gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;email&amp;quot;&amp;lt;/span&amp;gt;);&lt;br /&gt;
     page.addWidget('''new''' ox.UI.Password(_(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Password&amp;quot;&amp;lt;/span&amp;gt;), &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;password&amp;quot;&amp;lt;/span&amp;gt;);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ox.UI.Input&amp;lt;/code&amp;gt; is a simple text input field with a label. &amp;lt;code&amp;gt;ox.UI.Password&amp;lt;/code&amp;gt; is a subclass of &amp;lt;code&amp;gt;ox.UI.Input&amp;lt;/code&amp;gt; which does not display the entered password. Both constructors take the translated label as the only parameter. The created objects are passed as the first parameter to the method &amp;lt;code&amp;gt;addWidget&amp;lt;/code&amp;gt; of the configuration page. This adds them to the page and automatically aligns the labels and the input fields:&lt;br /&gt;
&lt;br /&gt;
[[Image:PluginAPIWidgets.png|center|Test page]]&lt;br /&gt;
&lt;br /&gt;
== Communication with the server ==&lt;br /&gt;
&lt;br /&gt;
The second parameter to &amp;lt;code&amp;gt;addWidget&amp;lt;/code&amp;gt; determines how the data of the added widget is handled by its parent container. When the user clicks on the Save button at the top of the window, the configuration page queries all its children and collects their data into a single object. In the example above, the second parameter is a string which specifies the field name in the composite object. When the user enters &amp;quot;user@example.com&amp;quot; as mail address and &amp;quot;secret&amp;quot; as password, the resulting object will be&lt;br /&gt;
&lt;br /&gt;
 { email: &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;user@example.com&amp;quot;&amp;lt;/span&amp;gt;, password: &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;secret&amp;quot;&amp;lt;/span&amp;gt; }&lt;br /&gt;
&lt;br /&gt;
To actually do something with the created object, we override the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; method of the page:&lt;br /&gt;
&lt;br /&gt;
 page.save = '''function'''(data, cont) {&lt;br /&gt;
     ox.JSON.put(AjaxRoot + &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;/com.example.test?action=set&amp;amp;session=&amp;quot;&amp;lt;/span&amp;gt; + session,&lt;br /&gt;
         data, cont, handleErrors);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The method gets called when the page needs to be saved (either because the user clicked on the Save button or because the user is about to leave the page). Its two parameters are &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt;, the object which contains the page's data, and &amp;lt;code&amp;gt;cont&amp;lt;/code&amp;gt;, a continuation function which should be called once the data is saved successfully. If the continuation function is not called, the data will still be considered as not saved, i. e. the user will be asked to save the data before leaving the page.&lt;br /&gt;
&lt;br /&gt;
In the example above, the parameters are passed unmodified to the static method &amp;lt;code&amp;gt;ox.JSON.put&amp;lt;/code&amp;gt;, which encodes the data as [http://json.org/ JSON] and sends it via an HTTP PUT request to the specified URL. Static methods for GET and POST requests are also available. The URL is constructed from the global variable &amp;lt;code&amp;gt;AjaxRoot&amp;lt;/code&amp;gt;, which specifies the path of the Open-Xchange application server (usually &amp;lt;code&amp;gt;/ajax&amp;lt;/code&amp;gt;), the name of a hypothetical Java servlet, and URL parameters which depend on the servlet. The URL parameter &amp;lt;code&amp;gt;session&amp;lt;/code&amp;gt; should be present in every servlet request and contain the value of the global variable of the same name. This parameter is used to protect against [http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF] attacks.&lt;br /&gt;
&lt;br /&gt;
The reply from the server should conform to the general rules of the [[HTTP API]], in particular, the error handling. If there are no errors, the reply is decoded and passed as an object to the specified callback function. In our case, that callback function is &amp;lt;code&amp;gt;cont&amp;lt;/code&amp;gt;, which ignores any parameters and merely updates some internal state. If there are errors, the callback is not called. Instead, the error is decoded and displayed by default. If, as in the above example, a second callback function is specified as the optional fourth parameter to &amp;lt;code&amp;gt;ox.JSON.put&amp;lt;/code&amp;gt; then it is called and given a chance to handle the error before or instead of displaying it. For our example this function handles the inevitable error which will occur when we try to access the non-existent servlet at &amp;lt;code&amp;gt;/ajax/com.example.test&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 '''function''' handleErrors(result, status) {&lt;br /&gt;
     '''if''' (status == 404 || status == 405) {&lt;br /&gt;
         ox.Configuration.error(&lt;br /&gt;
             _(&amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;Please write and install a servlet named com.example.test&amp;quot;&amp;lt;/span&amp;gt;));&lt;br /&gt;
         '''return''' '''true''';&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
There are two slightly different cases in which the error callback is called. When the server returns a properly formatted JSON reply with an error field as described in [[HTTP_API#Error_handling]], the callback is called with the object which represents the entire server reply as the only parameter. When the server returns an HTTP status code other than 200, the error callback is called with the status text as the first parameter and the status code as the second parameter. In both cases, the error handler can return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to prevent the default error handling from displaying the error message. This is exactly what the &amp;lt;code&amp;gt;handle404&amp;lt;/code&amp;gt; function does when the server returns an HTTP status 404 (&amp;quot;Not Found&amp;quot;) or 405 (&amp;quot;Method Not Allowed&amp;quot;). As a general rule, error callbacks should only return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for specific known cases, and let the default error handling process any unknown errors.&lt;br /&gt;
&lt;br /&gt;
Besides uploading of entered settings, a typical configuration page will need to display the currently active settings. These can be displayed by overriding the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method of the page:&lt;br /&gt;
&lt;br /&gt;
 page.load = '''function'''(cont) {&lt;br /&gt;
     ox.JSON.get(AjaxRoot + &amp;lt;span style=&amp;quot;color: #008&amp;quot;&amp;gt;&amp;quot;/com.example.test?action=get&amp;amp;session=&amp;quot;&amp;lt;/span&amp;gt; + session,&lt;br /&gt;
         '''function'''(reply) { cont(reply.data); }, handleErrors);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Similar to the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; method, the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method takes a continuation function as parameter. The difference is that, this time, the data travels in the other direction: instead of getting the data ''from'' the plugin API as a parameter, the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method must pass the data as parameter ''to'' the plugin API's continuation function. In most cases, the reply received from the server will not be structured exactly like the data object defined by &amp;lt;code&amp;gt;addWidget&amp;lt;/code&amp;gt; calls. Therefore, the continuation function can't be passed directly to &amp;lt;code&amp;gt;ox.JSON.get&amp;lt;/code&amp;gt; like in the &amp;lt;code&amp;gt;save&amp;lt;/code&amp;gt; method. Instead, an anonymous function is used to extract the data object from its &amp;lt;code&amp;gt;reply&amp;lt;/code&amp;gt; parameter and call the continuation function with the extracted data as parameter. The function does not need to be anonymous, but it must be defined inside of the &amp;lt;code&amp;gt;load&amp;lt;/code&amp;gt; method, to have access to &amp;lt;code&amp;gt;cont&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Viktor.Pracht</name></author>
	</entry>
</feed>