简体   繁体   English

Primefaces 4.0-SNAPSHOT过滤器通过新语法发布

[英]Primefaces 4.0-SNAPSHOT filterBy new syntax issue

In Primefaces 4.0, the syntax for the filterBy attribute has changed. 在Primefaces 4.0中,filterBy属性的语法已更改。 In the demo code they list the 3.x and the 4.x syntax. 在演示代码中,他们列出了3.x和4.x语法。 Basically it boils down to changing : 基本上可以归结为变化:

<p:column filterBy="#{var.property}"> ...

to: 至:

<p:column filterBy="property"> ...

That's all great, however we use a Map in the backing bean, which used to work really well in 3.5: 太好了,但是我们在后备bean中使用了Map,过去在3.5版本中它确实运行良好:

<p:column filterBy="#{utilityBean.vendorMap[var.id]}"> ...

My question is how do I accomplish the same thing with the new syntax ? 我的问题是,如何使用新语法完成相同的任务?

Edit (9/9/2013): 编辑(9/9/2013):

The Map in question returns the vendor's name, given the database ID: 给定数据库ID,有问题的Map返回供应商的名称:

private Map<BigInteger, String> vendorMap;

This issue was resolved in Primefaces 5.0. 此问题在Primefaces 5.0中已解决。 You can now use the old and new syntax. 现在,您可以使用新旧语法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM