p:datatable filter for date range

UI Components for JSF
Post Reply
rider
Posts: 497
Joined: 05 Mar 2010, 13:17

27 Feb 2021, 11:06

Hi,

I would like to try to filter my p:datatable with a time range... I´m trying this, but my table is not filtered?
Any idea what´s wrong?

I´m trying this:

Code: Select all

					<p:dataTable id="voucherAllListDatatable"
							value="#{voucherRequestByMandatoryController.lazyModel}"
							var="voucher" widgetVar="voucherTable" multiViewState="false"
							resizableColumns="false"
							selection="#{voucherRequestByMandatoryController.selectedVoucherList}"
							filteredValue="#{voucherRequestByMandatoryController.filteredVoucher}"
							rows="50" pageLinks="10" paginatorPosition="bottom" lazy="true"
							paginator="true" reflow="true" rowSelectMode="new"
							currentPageReportTemplate="(Eintrag: {startRecord}-{endRecord} von {totalRecords}, Seite: {currentPage} von {totalPages})"
							paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
							rowsPerPageTemplate="50,100,200" paginatorAlwaysVisible="false">

<p:column sortBy="#{voucher.documentDate}" visible="true"
								filterBy="#{voucher.documentDate}" filterMatchMode="range">
								<f:facet name="header">
									<h:outputText value="Belegdatum" />
								</f:facet>

								<f:facet name="filter">
									<p:datePicker id="range" selectionMode="range" appendTo="@(body)"
										value="#{voucher.documentDate}"
										onchange="PF('voucherTable').filter()"  >
										</p:datePicker>
								</f:facet>
Primefaces 12.0, WildFly 21

NOTiFY
Posts: 393
Joined: 25 May 2016, 22:57

28 Feb 2021, 13:02

rider wrote:
27 Feb 2021, 11:06
Any idea what´s wrong?
Display your Terminal of WildFly "standalone.sh" and see all in Java logging framework: WARNING, INFO, DEBUG, TRACE etc. so you can see what's going on.
PF 13.0.0--Jakarta. Jakarta Faces 4.0.1/Kotlin Multiplatform 1.9.10
Mojarra 4.0.2, OmniFaces 4.2
WildFly 29.0.1.Final 'preview' Jakarta EE 10.0.0
JDK 20.0.2, Kotlin 1.9.10, Gradle 8.3 Groovy DSL, MongoDB 7.0.0
IntelliJ IDEA 2023.2.1, macOS Ventura 13.5.1

rider
Posts: 497
Joined: 05 Mar 2010, 13:17

01 Mar 2021, 10:51

sorry, but I know I can check logs etc.

For this issue I´m not getting any error. I´ve selectd a range and nothing is happening
Primefaces 12.0, WildFly 21

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

01 Mar 2021, 15:43

Rider that doesn't work in 8.0 that was added for PF 10.0.0.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

rider
Posts: 497
Joined: 05 Mar 2010, 13:17

01 Mar 2021, 16:32

Ah ok, thanks
Primefaces 12.0, WildFly 21

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 53 guests