I am using af:table
component in a Report functionality in an ADF page.
My entire report data comes from a third party service.
This service accept some search criteria entred by user in report page.
After entring the search criteria when user clicks search button service gets invoked and data is rendered in Table.
Now,I need to enable filtering in some of my table columns.Applying filtering is very easy in case of VO based
table.But since data is comming from service I had custom Pojo List
<af:table scrollPolicy="page" autoHeightRows="8" value="#{myBean.pojoList}" var="myreport" id="t1"
styleClass="AFStretchWidth" filterVisible="true">
<af:column headerText="Header1" width="10%" filterable="true">
<f:facet name="header">
<af:inputText simple="true" value="#{myBean.filterInput1}" autoSubmit="true" valueChangeListener="#{mybean.method}"/>
</f:facet>
<af:outputText value="#{myreport.data}"/>
</af:column>
<!--other columns -->
<af:table>
Although input box
appearing in column header but it is comming in readonly mode.I am not able to enter anything.[valueChangeListener holds the filtering logic]
I tried with <f:facet name="filter">
but it also yields same output i.e a readonly input box.
I have getters and setters both in my managed bean still it appears in readonly mode.
can anyone suggest why it is rendering in readonly mode? Is there any other way for achieving filtering without using VO Based Table?
You first need to create a data control for the bean , after drag and drop that as table then filter model will get created and then you will be able customize the filters.
Search region Will be created as shown below
And your table uses it like below
You can download the sample application for reference from below link