XPages “filter by category name” for View Panel Controll random error

别说谁变了你拦得住时间么 提交于 2020-01-05 15:06:47

问题


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.

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.

[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] 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)


回答1:


Pixel,

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.



来源:https://stackoverflow.com/questions/25204214/xpages-filter-by-category-name-for-view-panel-controll-random-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!