- "in" was not fitting for a boolean value, better take "equals" and a
p:selectOneMenu tag to have a compact way of selecting available or not
available products
Signed-off-by: Roland Häder <roland@mxchange.org>
</h:outputText>
</p:column>
- <p:column headerText="#{project.ADMIN_HEADER_PRODUCT_AVAILABILITY}" sortBy="#{product.productAvailability}" filterBy="#{product.productAvailability}" filterMatchMode="in">
+ <p:column headerText="#{project.ADMIN_HEADER_PRODUCT_AVAILABILITY}" sortBy="#{product.productAvailability}" filterBy="#{product.productAvailability}" filterMatchMode="equals">
+ <f:facet name="filter">
+ <p:selectOneMenu onchange="PF('productList').filter()">
+ <f:converter converterId="javax.faces.Boolean" />
+ <f:selectItem itemLabel="#{msg.CHOICE_ALL}" itemValue="" />
+ <f:selectItem itemLabel="#{msg.CHOICE_YES}" itemValue="true" />
+ <f:selectItem itemLabel="#{msg.CHOICE_NO}" itemValue="false" />
+ </p:selectOneMenu>
+ </f:facet>
<h:outputText value="#{product.productAvailability ? msg.CHOICE_YES : msg.CHOICE_NO}" />
</p:column>