0

我正在尝试将过滤添加到丰富的数据表中,但遇到PropertyNotFoundException问题- 使用展示中的示例(Richfaces 4)我有以下

<f:facet name="noData">
   Nothing found
</f:facet>

<rich:column filter="#{mailerBean.firstNameFilterImpl}">
  <f:facet name="header">
<h:outputText value="First Name" />
<h:inputText value="#{mailerBean.firstNameFilter}" id="input">
  <a4j:ajax event="blur" render="dataTable" execute="@this" />
</h:inputText>
  </f:facet>

  <h:outputText value="#{person.firstName}" />
</rich:column>

豆子包含

@ManagedBean
@SessionScoped
public class MailerBean  implements Serializable {

............

public String getFirstNameFilter() {
  return firstNameFilter;
}

public void setFirstNameFilter(String firstNameFilter) {
  this.firstNameFilter = firstNameFilter;
}

public Filter<?> getFirstNameFilterImpl() {
  return new Filter<Person>() {
    public boolean accept(Person t) {
        String firstName = getFirstNameFilter();
        if (firstName == null || firstName.length() == 0 ||
            firstName.toLowerCase().contains(t.getFirstName().toLowerCase())) {
          return true;
        }
        return false;
    }
};

我得到的错误是

javax.el.PropertyNotFoundException:/mailinglistpage.xhtml @66,67 filter="#{mailerBean.firstNameFilterImpl}":在类型 com.patcomsys.zuzz.mailer.web.MailerBean 上找不到属性“firstNameFilterImpl”

该方法在 bean 中,它确实返回了一个 Filter 对象——你能看出什么问题吗?

谢谢

4

0 回答 0