0
votes

I have this dataTable:

<p:dataTable id="processes" var="process"
             value="#{homeBean.processesList}"
             filteredValue="#{homeBean.filteredProcesses}"
             rowKey="#{process.pid}"
             selection="#{homeBean.selectedProcesses}"
             paginator="true"
             rows="15"
             paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
             rowsPerPageTemplate="5,10,15" >

    <f:facet name="header">
        <h:outputText value="Processes" />
    </f:facet>

    <p:column name="owner"
              filterBy="#{process.owner}"
              filterMatchMode="contains"
              sortBy="owner"
              headerText="#{homeBean.selectedLogicalServer.os eq 'Windows' ? 'User Name' : 'OWNER'}">
        <h:outputText value="#{process.owner}" />
    </p:column>

    <p:column name="pid" filterBy="#{process.pid}" filterMatchMode="exact" sortBy="pid" headerText="PID">
        <h:outputText value="#{process.pid}" />
    </p:column>

    <p:column name="ppid"
              filterBy="#{process.ppid}"
              filterMatchMode="exact"
              sortBy="ppid"
              headerText="#{homeBean.selectedLogicalServer.os eq 'Windows' ? 'Session Number' : 'PPID'}">
        <h:outputText value="#{process.ppid}" />
    </p:column>

    <p:column name="c"
              filterBy="#{process.c}"
              filterMatchMode="exact"
              sortBy="c"
              headerText="#{homeBean.selectedLogicalServer.os eq 'Windows' ? '?' : 'C'}">
        <h:outputText value="#{process.c}" />
    </p:column>

    <p:column name="stime"
              filterBy="#{process.stime}"
              filterMatchMode="contains"
              sortBy="stime" headerText="#{homeBean.selectedLogicalServer.os eq 'Windows' ? '?' : 'STIME'}">
        <h:outputText value="#{process.stime}" />
    </p:column>

    <p:column name="tty"
              filterBy="#{process.tty}"
              filterMatchMode="contains"
              sortBy="tty"
              headerText="#{homeBean.selectedLogicalServer.os eq 'Windows' ? 'Session Name' : 'TTY'}">
        <h:outputText value="#{process.tty}" />
    </p:column>

    <p:column name="time"
              filterBy="#{process.time}"
              filterMatchMode="contains"
              sortBy="time"
              headerText="#{homeBean.selectedLogicalServer.os eq 'Windows' ? 'CPU TIME' : 'TIME'}">
        <h:outputText value="#{process.time}" />
    </p:column>

    <p:column name="cmd"
              filterBy="#{process.cmd}"
              filterMatchMode="contains"
              sortBy="cmd"
              headerText="#{homeBean.selectedLogicalServer.os eq 'Windows' ? 'Image Name' : 'CMD'}">
        <h:outputText value="#{process.cmd}" />
    </p:column>
</p:dataTable>

The problem: Property 'filteredProcesses' not recordable type for corp.gs.produban.atf.amp.mbeans.am.HomeBean is the error that follows the ProperyNotFoundException.

The dataTable has all the information but i can't filter that. My class starts right this:

@ManagedBean
@ViewScoped
public class HomeBean extends ManagedBeanBase implements Serializable {

And this is the attribute in the class and its setter and getter

public List<LogicalServerProcess> filteredProcesses;

public List<LogicalServerProcess> getFilteredProcesses() {
    return filteredProcesses;
}

public void setFilteredUsers(List<LogicalServerProcess> filteredProcesses) {
    this.filteredProcesses = filteredProcesses;
}

Any ideas?

1
FYI : A <p:column> does have the property name. It is id instead.Tiny

1 Answers

0
votes

The problem was that the filteredProcesses setter was named setFilteredUsers With the correct name its runs correctly