在 addContentItemPropertiesPane 中将属性设置为只读



我正在寻找使用AddContentItemDialog修改的添加文档视图。

我设法在工作详细信息中使用脚本适配器设置父文件夹,介绍文本,标题和文档属性

    try {
         var parentFolder = self.case.getCaseFolder();
         self.addContentItemDialog = new AddContentItemDialog();
         self.addContentItemDialog.setDefaultContentClass(prefix+"_Dumy01");

         aspect.after(self.addContentItemDialog.addContentItemPropertiesPane, "onCompleteRendering", function() {
             console.log("aspect.after(self.addContentItemDialog");
              self.addContentItemDialog.addContentItemPropertiesPane.setPropertyValue("Test_1", "123");
              self.addContentItemDialog.addContentItemPropertiesPane.setPropertyValue("DocumentTitle", "YYYYYY");
              self.addContentItemDialog.set("title","This is New Add Doc Event");
              self.addContentItemDialog.setIntroText("New Msg Can Be Set In this Tab");
         }, true);
         console.log("XX");
         self.addContentItemDialog.show(parentFolder.repository,parentFolder,true,false, null, null, false, null);
}catch (exception) {                                   
     console.log("exception" + exception);
}

现在,我希望在从脚本设置属性后使它们只读。

也许像,

self.addContentItemDialog.addContentItemPropertiesPane(Property).set("readOnly", "true");

谢谢

对此

的修复是,在">onCompleteRendering"下调用它

        var fields = this._commonProperties._propertyEditors._fields;
        for (var i = 0; i < fields.length; i++) {
          if(_logic_){  //Like (fields[i].get('name') == (prefix+"_MainFileCategory"));
            fields[i].readOnly = true;
            fields[i].textbox.readOnly = true;
          }
        }

从 http://www.notonlyanecmplace.com 那里找到了想法。

如果我正确回答了您的问题,我相信在这种情况下您最好的选择是 EDS,它会更容易、更灵活。 请查看以下来自 ECM 社区博客的链接,给出一个简单的示例,您可以利用该示例来实现类似的结果

示例 IBM 案例管理器的外部数据服务,作者:Dave Hanson

另外,请查看ICM 5.2红皮书,其中引用了上一版ICM红皮书(ICM 5.1版(的第16章:下载

最后,来自developerWorks的这个链接是一份简单明了的白皮书,其中包含示例代码,当我开始使用EDS进行案例管理器时,我发现这些代码非常有用:下载

最新更新