Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/458.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java IBM Filenet Content Navigator自定义插件-GridX行在编辑属性后变为空白_Java_Javascript_Plugins_Filenet P8_Ibm Content Navigator - Fatal编程技术网

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

Java IBM Filenet Content Navigator自定义插件-GridX行在编辑属性后变为空白,java,javascript,plugins,filenet-p8,ibm-content-navigator,Java,Javascript,Plugins,Filenet P8,Ibm Content Navigator,我正在开发一个ICN插件,但在修复这个小故障时遇到了麻烦,每个结果都会以网格小部件上应该的方式加载,但只要我在右侧面板上对其进行任何更改并保存它们,网格似乎要重新加载该行,但它变为空白,因为它没有加载绑定到我在java代码中指定的用于构建网格的列的属性 我正在使用ibm红皮书中的“第6章使用搜索服务和小部件创建功能”演示插件作为示例,但在这类插件上,我可以让navigator加载这些自定义列及其属性,我希望在编辑后重新加载它们 注意: 默认情况下,我指的是这些属性,默认情况下,每行始终具有:

我正在开发一个ICN插件,但在修复这个小故障时遇到了麻烦,每个结果都会以网格小部件上应该的方式加载,但只要我在右侧面板上对其进行任何更改并保存它们,网格似乎要重新加载该行,但它变为空白,因为它没有加载绑定到我在java代码中指定的用于构建网格的列的属性

我正在使用ibm红皮书中的“第6章使用搜索服务和小部件创建功能”演示插件作为示例,但在这类插件上,我可以让navigator加载这些自定义列及其属性,我希望在编辑后重新加载它们

注意: 默认情况下,我指的是这些属性,默认情况下,每行始终具有:

row.addAttribute("ID", doc.get_Id().toString(), JSONResultSetRow.TYPE_STRING, null, doc.get_Id().toString());
row.addAttribute("className", doc.getClassName(), JSONResultSetRow.TYPE_STRING, null, doc.getClassName());
row.addAttribute("ModifiedBy", doc.get_LastModifier(), JSONResultSetRow.TYPE_STRING, null, doc.get_LastModifier());
row.addAttribute("LastModified", doc.get_DateLastModified().toString(), JSONResultSetRow.TYPE_TIMESTAMP, null, doc.get_DateLastModified().toString());
row.addAttribute("Version", doc.get_MajorVersionNumber() + "." + doc.get_MinorVersionNumber(), JSONResultSetRow.TYPE_STRING, null, doc.get_MajorVersionNumber() + "." + doc.get_MinorVersionNumber());
row.addAttribute("{NAME}", doc.get_Name(), JSONResultSetRow.TYPE_STRING, null, doc.get_Name());
row.addAttribute("ContentSize", doc.get_ContentSize(), JSONResultSetRow.TYPE_INTEGER, null, null);
“自定义”指的是这样的内容,所有内容都是从XML文件加载的:

ArrayList<PluginProperty> pr = pxs.getResults(contextId);
    for (int i = 0; i < pr.size(); i++) {
        String id = "{" + i + "}";
        String propName = pr.get(i).getName();
        String propType = pr.get(i).getType();
        String prop = "";
    .
    .
    .
else if (propType.equalsIgnoreCase("StringList")) {
    int size = doc.getProperties().get(propName).getStringListValue().size();
    for (int j = 0; j < size; j++) {
        prop += doc.getProperties().get(propName).getStringListValue().get(j).toString() + "; ";
    }
}
else if (propType.equalsIgnoreCase("StringValue")) {
    prop = doc.getProperties().get(propName).getStringValue();
}
    .
    .
    .
    row.addAttribute(id, prop, JSONResultSetRow.TYPE_STRING, null, prop);
}
ArrayList pr=pxs.getResults(contextId);
对于(int i=0;i
保存文档信息数据后,调用openItem。这将使用最新数据更新项目

ContentList从_ModelStore.js getValue方法获取单元格值。此方法调用item.getDisplayValue以获取要在单元格中显示的值。很可能是item.getDisplayValue返回null(或空白),或者没有为此属性调用_ModelStore的getValue


我建议查看从openItem返回的JSON,以验证它是否完整。

最终发现了问题,显然ICN不希望您对行使用自定义ID。 我从XML文件中加载了一堆行,并创建了如下行:

ArrayList<PluginProperty> pr = pxs.getResults(contextId);
    for (int i = 0; i < pr.size(); i++) {
        String id = "{" + i + "}";
        String propName = pr.get(i).getName();
        String propType = pr.get(i).getType();
        String prop = "";
    .
    .
    .
else if (propType.equalsIgnoreCase("StringList")) {
    int size = doc.getProperties().get(propName).getStringListValue().size();
    for (int j = 0; j < size; j++) {
        prop += doc.getProperties().get(propName).getStringListValue().get(j).toString() + "; ";
    }
}
else if (propType.equalsIgnoreCase("StringValue")) {
    prop = doc.getProperties().get(propName).getStringValue();
}
    .
    .
    .
    row.addAttribute(id, prop, JSONResultSetRow.TYPE_STRING, null, prop);
}
因此,Id看起来像“Id”、“DocumentTitle”、“Creator”、“DateCreated”和“DateLastModified”,与每个属性的名称完全相同,而不是“{0}”、“1}”、“2}”等


希望这可能对其他人有所帮助

。。。那么这是一个插件还是一个插件呢?插件利用了两者。但我不知道问题到底在哪里,可能只是java方面的问题。环顾四周,但后来决定先尝试一些更简单的东西,因为问题显然在attriutes的ID中,我稍后会发布答案,不过谢谢。
String id = pr.get(i).getName();