filterBy required (but not required in showcase)

UI Components for JSF
Post Reply
tony.herstell
Posts: 214
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.
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:

Code: Select all

   ...primefaces
  <classifier>jakarta</classifier>
     ... theme
  <classifier>jakarta</classifier>

tony.herstell
Posts: 214
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.
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:

Code: Select all

   ...primefaces
  <classifier>jakarta</classifier>
     ... theme
  <classifier>jakarta</classifier>

Melloware
Posts: 3717
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 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

tony.herstell
Posts: 214
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 :)
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:

Code: Select all

   ...primefaces
  <classifier>jakarta</classifier>
     ... theme
  <classifier>jakarta</classifier>

tony.herstell
Posts: 214
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.
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:

Code: Select all

   ...primefaces
  <classifier>jakarta</classifier>
     ... theme
  <classifier>jakarta</classifier>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 45 guests