My table:
<p:dataTable id="table" widgetVar="table" stripedRows="true" reflow="true"
value="#{view.dtos}" filteredValue="#{view.filteredDTOs}"
var="dto" selection="#{view.selectedDTOs}" rowKey="#{dto.id}" paginator="true"
rows="10" rowSelectMode="add">
My datepicker:
<p:column headerText="Last Updated" field="date" filterMatchMode="between">
<f:facet name="filter">
<p:datePicker selectionMode="range" onchange="PF('table').filter()" />
</f:facet>
</p:column>
Date picker pops up, select a date range, and no filter is applied. server side error:
cannot validate component with empty value: form:table:j_id_5q
inspecting the input field on the column header, there doesn't seem to be a value attribute:
<input id="form:table:j_id_5q_input" name="form:table:j_id_5q_input" type="text" class="ui-inputfield ui-widget ui-state-default ui-corner-all ui-state-filled" onchange="PF('table').filter()" role="textbox" aria-readonly="false" aria-disabled="false" data-dashlane-rid="66daf59ca3f6ca4a" data-form-type="address">
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>11.0.0-RC2</version>
</dependency>
p:datePicker not updating filter input
See the Default Filter example here which uses a Date Range Filter: https://www.primefaces.org/showcase/ui/ ... lter.xhtml
I would follow that example exactly.
I would follow that example exactly.
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
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Posts: 36
- Joined: 14 Nov 2021, 01:48
I'm getting:
java.time.LocalDate cannot be cast to java.util.Date
My list of objects has a GregorianCalendar object.
<p:column headerText="Last Updated" field="updatedDate.time" filterMatchMode="between">
<f:facet name="filter">
<p:datePicker selectionMode="range" onchange="PF('itemTable').filter()" />
</f:facet>
</p:column>
Do I need to implement a converter somewhere?
java.time.LocalDate cannot be cast to java.util.Date
My list of objects has a GregorianCalendar object.
<p:column headerText="Last Updated" field="updatedDate.time" filterMatchMode="between">
<f:facet name="filter">
<p:datePicker selectionMode="range" onchange="PF('itemTable').filter()" />
</f:facet>
</p:column>
Do I need to implement a converter somewhere?
I have not used GregorianCalendar but if you put together a small PrimeFaces Test reproducer I can help debug it.
See: https://github.com/primefaces/primefaces-test
See: https://github.com/primefaces/primefaces-test
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
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Posts: 36
- Joined: 14 Nov 2021, 01:48
Ok, I can just do a custom filter to fix this.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 40 guests