PF version: 3.0.RC2 (As far as I can tell it has been present in all 3.X versions but NOT in 2.2.X)
Spring version: 3.0.4.RELEASE
JSF version: 2.0.4
Webflow version: 2.2.1.RELEASE
EDIT: Server is for example tomcat 7.0.12, but I have tried with others also without success.
flow xml:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<view-state id="start" view="sandbox.xhtml">
<on-entry>
<evaluate expression="new org.mypackage.SandboxBean()" result="flowScope.sandboxBean"/>
</on-entry>
</view-state>
</flow>
Code: Select all
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ap="http://java.sun.com/jsf/composite/ap"
xmlns:dyn="http://java.sun.com/jsf/composite/dyn">
<h:head>
<ui:insert name="headIncludes" />
<link type="text/css" rel="stylesheet" href="../styles/ap-base.css" />
</h:head>
<h:body>
<h:form id="mainForm">
<p:commandLink value="Show table" actionListener="#{sandboxBean.setShowTable(true)}" update=":mainForm" />
<p:dataTable rendered="#{sandboxBean.showTable}" var="rowVar" value="#{sandboxBean.firstList}">
<p:column filterBy="#{rowVar}" filterMatchMode="contains">
<h:outputText value="#{rowVar}" />
</p:column>
</p:dataTable>
</h:form>
</h:body>
</html>
Code: Select all
package org.mypackage;
import java.io.Serializable;
import java.util.ArrayList;
public class SandboxBean implements Serializable {
private ArrayList<String> firstList;
private boolean showTable;
public SandboxBean() {
firstList = new ArrayList<String>();
firstList.add("TestString");
}
public ArrayList<String> getFirstList() {
return firstList;
}
public boolean isShowTable() {
return showTable;
}
public void setShowTable(boolean showTable) {
this.showTable = showTable;
}
}
From, debugging, I've reached the conclusion that something is happening in the DataTable class in this section:
Code: Select all
public boolean isFilteringEnabled() {
Object value = getStateHelper().get("filtering");
return value == null ? false : true;
}
public void enableFiltering() {
getStateHelper().put("filtering", true);
}
If you need any additional information about our configuration don't hesitate to ask.