diff --git a/src/main/java/org/primefaces/showcase/view/data/datatable/ColumnsView.java b/src/main/java/org/primefaces/showcase/view/data/datatable/ColumnsView.java index 037cb6850..8dcf0b0c4 100644 --- a/src/main/java/org/primefaces/showcase/view/data/datatable/ColumnsView.java +++ b/src/main/java/org/primefaces/showcase/view/data/datatable/ColumnsView.java @@ -23,6 +23,11 @@ */ package org.primefaces.showcase.view.data.datatable; +import jakarta.annotation.PostConstruct; +import jakarta.faces.context.FacesContext; +import jakarta.faces.view.ViewScoped; +import jakarta.inject.Inject; +import jakarta.inject.Named; import java.io.Serializable; import java.lang.reflect.Field; import java.time.temporal.Temporal; @@ -32,13 +37,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; - -import jakarta.annotation.PostConstruct; -import jakarta.faces.context.FacesContext; -import jakarta.faces.view.ViewScoped; -import jakarta.inject.Inject; -import jakarta.inject.Named; - +import io.quarkus.runtime.annotations.RegisterForReflection; import org.primefaces.component.datatable.DataTable; import org.primefaces.showcase.domain.Customer; import org.primefaces.showcase.service.CustomerService; @@ -47,15 +46,14 @@ @ViewScoped public class ColumnsView implements Serializable { + @Inject + CustomerService service; private String columnTemplate = "name country date status activity"; private List columns; private List customers; private List filteredCustomers; private Map validColumns; - @Inject - CustomerService service; - @PostConstruct public void init() { customers = service.getCustomers(10); @@ -64,10 +62,6 @@ public void init() { createDynamicColumns(); } - public void setColumns(List columns) { - this.columns = columns; - } - public List getCustomers() { return customers; } @@ -104,6 +98,10 @@ public List getColumns() { return columns; } + public void setColumns(List columns) { + this.columns = columns; + } + private void createDynamicColumns() { String[] columnKeys = columnTemplate.split(" "); columns = new ArrayList<>(); @@ -126,12 +124,13 @@ public void updateColumns() { createDynamicColumns(); } + @RegisterForReflection public static class ColumnModel implements Serializable { - private String header; - private String property; + private final String header; + private final String property; private String type; - private Class klazz; + private final Class klazz; public ColumnModel(String header, String property, Class klazz) { this.header = header; @@ -159,10 +158,9 @@ public Class getKlazz() { private void initType() { if (Temporal.class.isAssignableFrom(klazz)) { type = "date"; - } - else if (klazz.isEnum()) { + } else if (klazz.isEnum()) { type = "enum"; } } } -} +} \ No newline at end of file diff --git a/src/main/java/org/primefaces/showcase/view/data/treetable/ColumnsView.java b/src/main/java/org/primefaces/showcase/view/data/treetable/ColumnsView.java index 2fcb5252a..27b276e3a 100644 --- a/src/main/java/org/primefaces/showcase/view/data/treetable/ColumnsView.java +++ b/src/main/java/org/primefaces/showcase/view/data/treetable/ColumnsView.java @@ -23,17 +23,16 @@ */ package org.primefaces.showcase.view.data.treetable; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - - import jakarta.annotation.PostConstruct; import jakarta.faces.view.ViewScoped; import jakarta.inject.Inject; import jakarta.inject.Named; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import io.quarkus.runtime.annotations.RegisterForReflection; import org.primefaces.model.TreeNode; import org.primefaces.showcase.domain.Document; import org.primefaces.showcase.service.DocumentService; @@ -91,10 +90,11 @@ public List getColumns() { return columns; } + @RegisterForReflection public static class ColumnModel implements Serializable { - private String header; - private String property; + private final String header; + private final String property; public ColumnModel(String header, String property) { this.header = header; @@ -109,4 +109,4 @@ public String getProperty() { return property; } } -} +} \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/template/template.xhtml b/src/main/resources/META-INF/resources/template/template.xhtml index d5f5e4556..d6eb2115d 100644 --- a/src/main/resources/META-INF/resources/template/template.xhtml +++ b/src/main/resources/META-INF/resources/template/template.xhtml @@ -102,6 +102,8 @@ + + diff --git a/src/main/resources/META-INF/resources/template/topbar.xhtml b/src/main/resources/META-INF/resources/template/topbar.xhtml index c0f9bca70..ddbe055da 100644 --- a/src/main/resources/META-INF/resources/template/topbar.xhtml +++ b/src/main/resources/META-INF/resources/template/topbar.xhtml @@ -1,4 +1,4 @@ -
@@ -6,11 +6,12 @@ - + @@ -18,22 +19,62 @@
  • Themes
      - +
    • PRIMEONE
    • -
    • Saga
    • -
    • Vela
    • -
    • Arya
    • +
    • Saga +
    • +
    • Vela +
    • +
    • Arya +
    • LEGACY
    • -
    • Nova
    • -
    • Nova Alt
    • -
    • Nova Accent
    • -
    • Luna Amber
    • -
    • Luna Blue
    • -
    • Luna Green
    • -
    • Luna Pink
    • +
    • Nova +
    • +
    • Nova Alt
    • +
    • Nova Accent
    • +
    • Luna Amber
    • +
    • Luna Blue
    • +
    • Luna Green
    • +
    • Luna Pink
  • -
    + \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/ui/chart/pie.xhtml b/src/main/resources/META-INF/resources/ui/chart/pie.xhtml index 2a9696872..b61b487da 100644 --- a/src/main/resources/META-INF/resources/ui/chart/pie.xhtml +++ b/src/main/resources/META-INF/resources/ui/chart/pie.xhtml @@ -1,49 +1,53 @@ - + + - + Charts Pie - PieChart is created with raw JSON or using an XDEV model. - Using the extender functionality to add Data Labels to the pie chart with the Data Labels plugin. + PieChart is created with raw JSON or using an XDEV model. + Using the + extender functionality to add Data Labels to the pie chart with the Data Labels plugin. - - + +
    @@ -55,4 +59,4 @@
    -
    + \ No newline at end of file diff --git a/src/main/resources/META-INF/resources/ui/data/datatable/filter.xhtml b/src/main/resources/META-INF/resources/ui/data/datatable/filter.xhtml index 5275fb393..4b542641a 100644 --- a/src/main/resources/META-INF/resources/ui/data/datatable/filter.xhtml +++ b/src/main/resources/META-INF/resources/ui/data/datatable/filter.xhtml @@ -30,66 +30,72 @@
    Column Filtering
    + emptyMessage="No customers found with given criteria" + filteredValue="#{dtFilterView.filteredCustomers1}" + globalFilterOnly="#{dtFilterView.globalFilterOnly}">
    List of Customers
    - - + +
    - - + + - - - + + + + sortBy="#{customer.representative.name}"> - - + + - + style="vertical-align: middle"/> + - + - - + + - #{customer.status.toString()} + #{customer.status.statusName} - +
    @@ -99,56 +105,60 @@
    Default Filter
    + emptyMessage="No customers found with given criteria" + filteredValue="#{dtFilterView.filteredCustomers2}" filterBy="#{dtFilterView.filterBy}"> List of Customers - + - - - + + + - - + + - + style="vertical-align: middle"/> + - + - - + + - #{customer.status.toString()} + #{customer.status.statusName} - + @@ -164,35 +174,37 @@
    + placeholder="Search all fields using global function"/>
    - - - + + + - + style="vertical-align: middle"/> + - #{customer.status.toString()} + #{customer.status.statusName} - +
    - + \ No newline at end of file diff --git a/src/main/resources/META-INF/web.xml b/src/main/resources/META-INF/web.xml index a4406ea2f..c975eb488 100644 --- a/src/main/resources/META-INF/web.xml +++ b/src/main/resources/META-INF/web.xml @@ -1,9 +1,9 @@ @@ -86,12 +86,6 @@ primefaces.js.COMBINED_RESOURCE_HANDLER_DISABLED true - @@ -139,8 +133,7 @@ org.omnifaces.CDN_RESOURCE_HANDLER_URLS - cdn:hammer.js=https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js, - cdn:chartjs-plugin-zoom.js=https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-zoom/2.0.1/chartjs-plugin-zoom.min.js + cdn:chartjs-plugin-datalabels.js=https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.2.0 @@ -158,6 +151,16 @@ /* + + + GzipResponseFilter + org.omnifaces.filter.GzipResponseFilter + + + GzipResponseFilter + Faces Servlet + + NoCacheFilter @@ -247,4 +250,4 @@ svg#fontawesomeregular image/svg+xml - + \ No newline at end of file