XPages“按类别名称过滤"用于View Panel Controll随机错误 [英] XPages "filter by category name" for View Panel Controll random error
问题描述
我在IBM XPages中使用View Panel Controll遇到了一个非常奇怪的问题. 当我尝试使用选项按类别名称过滤"创建单个类别时,我随机返回了错误的结果,这意味着,我得到了所有文档,而不是单个类别.关键参数是未计算的,因此排除了我的问题.
I got a very strange problem with View Panel Controll in IBM XPages. When I try to make a single category with the option "filter by category name" I got randomly a wrong result back, what means, I got all document back instead of the single category. The key parameter is not calculated, so that this is excluded as the reason for my problem.
当我创建一个简单的示例数据库以查看这是否是XPages中的一般错误时,我无法重现它.看来,只有在XPage中发生更多事情时,它才会发生.而且这还取决于服务器的性能.也许是生命周期问题?
When I create a simple expample db to see if this is a general bug in XPages, I can't reproduce it. It seems, that it only happens when a lot more stuff is going on in the XPage. And it also depends on the server performance. Maybe a lifecycle problem?
当我对查看面板"属性按列值过滤"执行相同操作时,我没有遇到任何问题. 但是我不能使用它,因为它速度慢很多,并且从视图中删除了键列之后的类别.
When I do the same with the View Panel property "Filter by column value" I got no problems. But I can't use it because its a lot slower and it removes the categories after the keycolumn from the view.
任何建议都会有所帮助.
Any suggestion would be helpful.
[更新] 在查看面板"中没有任何计算,每个属性都是固定的String. singelkey就像"123456",仅此而已.所以这不是问题.仅当我将1000个具有复杂公式的字段添加到XPages时,才会发生此问题.但是正如我所说的,问题只是随机的,我总是对属性使用相同的值.这一定是时机.
[UPDATE] In the View Panel is nothing calculated, every property is a fixed String. The singelkey is just like "123456" nothing more. So this can't be the problem. The problem only happens when i add for example 1000 fields with complex formulars to the XPages. But as i sayed the problem is only randomly and i alway use the same values for the properties. It must be a timing thing.
[UPDATE2]
当<xp:viewPanel>
它是XPage上唯一的元素时,一切正常,当我向XPages中添加1000次<xp:inputText value="COMPLEX SSJS OR JAVA METHOD">
时,它也不再起作用.当我使用平面视图将关键参数设置为按列值过滤"属性时,它始终有效.但是此解决方案对我不起作用(上面的原因说明)
[UPDATE2]
When the <xp:viewPanel>
it the only element on my XPage everything works fine, when i add a <xp:inputText value="COMPLEX SSJS OR JAVA METHOD">
a 1000 times to the XPages as well, it don't work anymore. When i set my key parmeter to the property "filter by column value" with a flat view it always works. But this solution did not work for me (the statement why is above)
推荐答案
像素,
我认为这就像让else返回永远不会发生的事情一样简单.如果类别由于任何原因返回null,它将返回所有文档.拥有将返回永远不会发生的东西的其他东西应该可以解决您的问题.
I think this is as simple as having an else that returns something that will never occur. If the category returns a null for any reason, it will return all documents. Having the else that returns something that will never happen should fix your problem.
<xp:this.categoryFilter><![CDATA[#{javascript:if(category == "FilteredCategory"){
return "your category"
} else {
return "never-a-category";
}}]]></xp:this.categoryFilter>
如果这不是答案,请在您的问题中发布代码.
If this isn't the answer, then please post your code in your question.
这篇关于XPages“按类别名称过滤"用于View Panel Controll随机错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!