myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] branch master updated: use PF8
Date Fri, 06 Mar 2020 10:30:44 GMT
This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new c14b500  use PF8
c14b500 is described below

commit c14b500a373bf157d3a3943b269dbd2ff45ee4c0
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Fri Mar 6 11:30:37 2020 +0100

    use PF8
---
 extensions/quarkus/showcase/pom.xml                                  | 3 ++-
 .../core/extensions/quarkus/showcase/view/LazyCarDataModel.java      | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/extensions/quarkus/showcase/pom.xml b/extensions/quarkus/showcase/pom.xml
index 90823ad..2d98fcc 100644
--- a/extensions/quarkus/showcase/pom.xml
+++ b/extensions/quarkus/showcase/pom.xml
@@ -62,13 +62,14 @@
         <dependency>
             <groupId>org.primefaces</groupId>
             <artifactId>primefaces</artifactId>
-            <version>7.0</version>
+            <version>8.0</version>
         </dependency>
         <dependency>
             <groupId>javax.validation</groupId>
             <artifactId>validation-api</artifactId>
             <version>2.0.1.Final</version>
         </dependency>
+
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-junit5</artifactId>
diff --git a/extensions/quarkus/showcase/src/main/java/org/apache/myfaces/core/extensions/quarkus/showcase/view/LazyCarDataModel.java
b/extensions/quarkus/showcase/src/main/java/org/apache/myfaces/core/extensions/quarkus/showcase/view/LazyCarDataModel.java
index 56bb78f..5b6539f 100644
--- a/extensions/quarkus/showcase/src/main/java/org/apache/myfaces/core/extensions/quarkus/showcase/view/LazyCarDataModel.java
+++ b/extensions/quarkus/showcase/src/main/java/org/apache/myfaces/core/extensions/quarkus/showcase/view/LazyCarDataModel.java
@@ -23,6 +23,7 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import org.primefaces.model.FilterMeta;
 import org.primefaces.model.LazyDataModel;
 import org.primefaces.model.SortOrder;
 
@@ -54,7 +55,7 @@ public class LazyCarDataModel extends LazyDataModel<Car> {
     }
 
     @Override
-    public List<Car> load(int first, int pageSize, String sortField, SortOrder sortOrder,
Map<String, Object> filters) {
+    public List<Car> load(int first, int pageSize, String sortField, SortOrder sortOrder,
Map<String, FilterMeta> filters) {
         List<Car> data = new ArrayList<Car>();
 
         //filter
@@ -65,7 +66,7 @@ public class LazyCarDataModel extends LazyDataModel<Car> {
                 for (Iterator<String> it = filters.keySet().iterator(); it.hasNext();)
{
                     try {
                         String filterProperty = it.next();
-                        Object filterValue = filters.get(filterProperty);
+                        Object filterValue = filters.get(filterProperty).getFilterValue();
                         String fieldValue = String.valueOf(car.getClass().getField(filterProperty).get(car));
 
                         if (filterValue == null || fieldValue.startsWith(filterValue.toString()))
{


Mime
View raw message