filterBy required (but not required in showcase)

UI Components for JSF
Post Reply
tony.herstell
Posts: 184
Joined: 29 Nov 2011, 00:40

20 Jul 2021, 23:16

https://www.primefaces.org/showcase/ui/ ... fwid=c128e
The status field is showing for selectOne in the showcase.


But; I have to add "filterBy="#{eachWeek.jetSizeKind}"" to see the selectOne turn up.

Code: Select all

<p:column headerText="Jet Size" sortable="true" sortBy="#{eachWeek.jetSizeKind}" filterable="true" filterBy="#{eachWeek.jetSizeKind}" filterMatchMode="exact">
	<f:facet name="filter">
	           <p:selectOneMenu onchange="PF('weeksTableWV').filter()" styleClass="custom-filter">
	                   <f:selectItem itemLabel="All" itemValue="#{null}" noSelectionOption="true" />
			   <f:selectItems value="#{weeksController.jetSizeKindOptions}" />
	            </p:selectOneMenu>
          </f:facet>
          <h:outputText value="#{eachWeek.jetSizeKind}"/>
</p:column>
Selecting the menu does work; but server log shows this:
2021-07-21 09:12:42,685 WARNING [jav.fac.val.BeanValidator] (executor-thread-25) cannot validate component with empty value: weeksForm:weeksTable:j_id_3f

The Table in the demo is also sortable; yet there is no sorting enabled (or am I missing soemthing)?

Is that the right code shown in the showcase?


This is a Quarkus project.
PF10, JEE 8 (CDI, JPA etc.) (No Spring)
Target Quarkus (JSF) and JBoss Wildfly 21+

tony.herstell
Posts: 184
Joined: 29 Nov 2011, 00:40

20 Jul 2021, 23:41

I found I didnt have ALL the fields:
<p:column field="jetSizeKind"
I didnt have the "field" which came up when I was setting up some pre-filtering.
This may be a proble; but still does not show sortable is appearing.
PF10, JEE 8 (CDI, JPA etc.) (No Spring)
Target Quarkus (JSF) and JBoss Wildfly 21+

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

21 Jul 2021, 13:48

Can you confirm what `weeksForm:weeksTable:j_id_3f` actually is?

I do exactly what you do above in my projects and mine works fine.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 10.0.2 / PF Extensions 10.0.2

tony.herstell
Posts: 184
Joined: 29 Nov 2011, 00:40

21 Jul 2021, 19:28

I really was missing:

field="jetSizeKind"

But I still dont see how the column is becoming sortable.

No matter as I found the problem was me and Mk1 eyeballs :)
PF10, JEE 8 (CDI, JPA etc.) (No Spring)
Target Quarkus (JSF) and JBoss Wildfly 21+

tony.herstell
Posts: 184
Joined: 29 Nov 2011, 00:40

22 Jul 2021, 00:42

>> But I still dont see how the column is becoming sortable.

Sortable of the fields just happens to be "Auto Added" when you use the main filterby.

Works for me; so not complaining.
PF10, JEE 8 (CDI, JPA etc.) (No Spring)
Target Quarkus (JSF) and JBoss Wildfly 21+

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 94 guests