PartialRendered DataTable Pagination/Filter/Sorting

UI Components for JSF
Post Reply
pratham.dev
Posts: 1
Joined: 25 Aug 2011, 06:44

25 Aug 2011, 22:12

Hi,

I populated a DataTable in a DialogBox using a ActionListener of a button in the same form. But after the data is populated the pagination and filtering do not work when populated with actionListener. My object is Serializable.

Code: Select all

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html 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:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <f:view contentType="text/html">

        <h:head>
            <title>eLease Security</title>
            <style>
                .ui-widget,
                .ui-widget .ui-widget {
                    font-size: 12px !important;
                }
            </style>
        </h:head>
        <h:body styleClass="ui-widget">
            <h:form id="task_form">  
                <p:commandButton label="Populate List" value="Populate List" update="taskList" actionListener="#{taskController.fetchTaskList}"/>
                <p:dataTable var="task" 
                             value="#{taskController.taskList}" 
                             id="taskList" 
                             paginator="true"
                             selection="#{taskController.selectedTask}"
                             selectionMode="single"
                             rows="15">
                    <f:facet name="header">  
                        Task Details
                    </f:facet> 
                    <p:column headerText="Lease Actions" filterBy="#{task.leaseAction}">
                        <h:outputText value="#{task.leaseAction}" />
                    </p:column>
                    <p:column headerText="Phase" filterBy="#{task.phase}">
                        <h:outputText value="#{task.phase}" />
                    </p:column>
                    <p:column headerText="Process" filterBy="#{task.process}">
                        <h:outputText value="#{task.process}" />
                    </p:column>
                    <p:column headerText="Task Name" filterBy="#{task.task}">
                        <h:outputText value="#{task.task}" />
                    </p:column>
                    <p:column headerText="Task Description">
                        <h:outputText value="#{task.description}" />
                    </p:column>
                </p:dataTable> 
            </h:form>  
        </h:body>
        <ui:include src="footer.xhtml"/>
    </f:view>
</html>
Pratham Developer,
Editor: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02
JSF: 2.1
PrimeFaces: 3.0M2
Server: Apache Tomcat Version 7.0.20
System: Windows 7 version 6.1 running on x86;

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests