]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Tue, 27 Mar 2018 21:41:51 +0000 (23:41 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 27 Mar 2018 21:41:51 +0000 (23:41 +0200)
- "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>
web/admin/generic_product/admin_generic_product_list.xhtml

index 478a2ad3cd49eb47668c684259bb79c98cbab163..5cd8d7e0bd3c26bf32459977e3a82f100e0f627a 100644 (file)
                                        </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>