javascript - 在 addContentItemPropertiesPane 中将属性设置为只读

标签 javascript dojo ibm-content-navigator ibm-case-manager

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

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

    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 中找到想法.

关于javascript - 在 addContentItemPropertiesPane 中将属性设置为只读,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47201583/

相关文章:

javascript - 展开/折叠文本区域问题

javascript - 在 IE 中使用 Dojo 1.9.1 不起作用

JavaScript:时刻 diff 函数给出不正确的天数差异

javascript - 使用 Amazon SNS 推送通知( Node )

javascript - 使用正则表达式突出显示一组字符串

dojo - 我可以在 dojo Accordion 中打开特定条目吗?

javascript - dijit/表单/过滤选择 : How can I trigger an onchange event manually

dojo - WebSphere 上的 IBM Content Navigator 不会应用对小部件所做的 JavaScript 更改

java - IBM Filenet Content Navigator 自定义插件 - 编辑属性后 GridX 行变为空白