gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 06:38:21 25 4
gpt4 key购买 nike

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

ICN Plugin Grid 1

ICN Plugin Grid 2

我使用 ibm 红皮书中的“第 6 章创建带有搜索服务和小部件的功能”演示插件作为示例,但是在这种插件上,我到底可以在哪里让导航器加载这些自定义列及其属性(我希望它在编辑后重新加载)?

注意:默认情况下,我的意思是这些列,默认情况下每行总是具有的属性:

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);
}

最佳答案

保存文档信息数据后,调用openItem。这会使用最新数据更新该项目。

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

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

关于java - IBM Filenet Content Navigator 自定义插件 - 编辑属性后 GridX 行变为空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24997990/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com