0

我无法将用户属性保存到 zimlet 文件夹中的 XML 文件。

XML结构:

<zimlet name="ca_uoguelph_ccs_archive" version="2.0.2" label="Archive" description="Archives emails in the inbox by date.">
  <include>ca_uoguelph_ccs_archive.js</include>
  <includeCSS>ca_uoguelph_ccs_archive.css</includeCSS>
  <handlerObject>ca_uoguelph_ccs_archiveHandlerObject</handlerObject>
  <userProperties>
    <property type="string" name="archive_mainFolderId" value="" />
    <property type="string" name="archive_by_preference" value="y" />
    <property type="string" name="archive_auto_enabled" value="false" />
    <property type="string" name="archive_auto_last_run" value="" />
    <property type="string" name="archive_auto_settings" value="" />
  </userProperties>
</zimlet>

应该保存属性的功能:

CcsArchive.prototype.setArchiveFolderId = function(id) {
    if (this.getArchiveFolderId() !== id) {
        this.setUserProperty(CcsArchive.CCS_ARCHIVE_FOLDER_ID, id, true);
    }
};

// (CcsArchive.CCS_ARCHIVE_FOLDER_ID = archive_mainFolderId)

调用 setUserProperty 并且它没有给出任何错误,但属性没有保存到 xml 文件中......

4

1 回答 1

0

您是否尝试过 ZDesktop 或 Zimbra 环境?
我认为问题出在“ModifyPropertiesRequest”肥皂请求中:http: //files.zimbra.com/docs/soap_api/8.0/soapapi-zimbra-doc/api-reference/index.html

在使用 ZDesktop 的开发模式下似乎无法正常工作。

我通常使用 ZmMetaData 来持久化用户信息。
http://files.zimbra.com/docs/zimlet/zcs/8.0.4/jsdocs/symbols/ZmMetaData.html

于 2013-11-05T18:16:09.160 回答