From 2060b4dba0c3fde0d1d99a58e2888799e24f8b89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 17 Apr 2020 16:59:29 +0200 Subject: [PATCH] Don't cherry-pick: - heavy rewrite on (almost?) all admin-list-foo views, to use @ViewScoped beans and working JSR107 caching - also sorted out mixed usage of userController (or so?) as the login and register backing beans can surely have their own properties - rewrote web/WEB-INF/resources/tags/admin/dropdown/ to have it included back in views again, was a bad idea MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../FinancialsReceiptListWebViewBean.java | 2 +- .../FinancialsReceiptItemListWebViewBean.java | 2 +- web/WEB-INF/project-links.jsf.taglib.xml | 46 ------------------- .../financial/receipt/admin_receipt_links.tpl | 24 ---------- .../receipt_item/admin_receipt_item_links.tpl | 24 ---------- .../receipt/admin_form_financial_receipt.tpl | 4 +- .../receipt/login_form_financial_receipt.tpl | 4 +- .../receipt/admin_receipt_list.xhtml | 31 +++++++++++-- .../admin_receipt_item_list.xhtml | 27 ++++++++++- 9 files changed, 60 insertions(+), 104 deletions(-) delete mode 100644 web/WEB-INF/resources/tags/admin/dropdown/financial/receipt/admin_receipt_links.tpl delete mode 100644 web/WEB-INF/resources/tags/admin/dropdown/financial/receipt_item/admin_receipt_item_links.tpl diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/list/FinancialsReceiptListWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/list/FinancialsReceiptListWebViewBean.java index ed562fb9..03b360a2 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/list/FinancialsReceiptListWebViewBean.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt/list/FinancialsReceiptListWebViewBean.java @@ -236,7 +236,7 @@ public class FinancialsReceiptListWebViewBean extends BaseFinancialsBean impleme // Is cache there? if (!this.receiptCache.iterator().hasNext()) { // Add all - for (final BillableReceipt receipt : this.receiptBean.allReceipts()) { + for (final BillableReceipt receipt : this.receiptBean.fetchAllReceipts()) { // Add it to cache this.receiptCache.put(receipt.getReceiptId(), receipt); } diff --git a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/list/FinancialsReceiptItemListWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/list/FinancialsReceiptItemListWebViewBean.java index 20c7f566..9da906a0 100644 --- a/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/list/FinancialsReceiptItemListWebViewBean.java +++ b/src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/list/FinancialsReceiptItemListWebViewBean.java @@ -206,7 +206,7 @@ public class FinancialsReceiptItemListWebViewBean extends BaseFinancialsBean imp // Is cache there? if (!this.receiptItemCache.iterator().hasNext()) { // Add all - for (final BillableReceiptItem receiptItem : this.receiptItemBean.allReceiptItems()) { + for (final BillableReceiptItem receiptItem : this.receiptItemBean.fetchAllReceiptItems()) { // Add it to cache this.receiptItemCache.put(receiptItem.getItemId(), receiptItem); } diff --git a/web/WEB-INF/project-links.jsf.taglib.xml b/web/WEB-INF/project-links.jsf.taglib.xml index 80c99e24..41e073dd 100644 --- a/web/WEB-INF/project-links.jsf.taglib.xml +++ b/web/WEB-INF/project-links.jsf.taglib.xml @@ -22,50 +22,4 @@ along with this program. If not, see . xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd" > http://mxchange.org/jsf/jfinancials/links - - outputReceiptAdminDropdownMenu - This tag renders a full h:panelGroup for an administrative drop-down menu for receipt data. - resources/tags/admin/dropdown/financial/receipt/admin_receipt_links.tpl - - receipt - The receipt instance that provides the data for this tag. - true - org.mxchange.jfinancials.model.receipt.BillableReceipt - - - renderShowLink - Whether this tag is used to show receipt data (default true). - false - java.lang.Boolean - - - rendered - Whether this tag is being rendered by JSF engine (default: true). - false - java.lang.Boolean - - - - outputReceiptItemAdminDropdownMenu - This tag renders a full h:panelGroup for an administrative drop-down menu for receipt item data. - resources/tags/admin/dropdown/financial/receipt_item/admin_receipt_item_links.tpl - - receiptItem - The receipt item instance that provides the data for this tag. - true - org.mxchange.jfinancials.model.receipt_item.BillableReceiptItem - - - renderShowLink - Whether this tag is used to show receipt item data (default true). - false - java.lang.Boolean - - - rendered - Whether this tag is being rendered by JSF engine (default: true). - false - java.lang.Boolean - - diff --git a/web/WEB-INF/resources/tags/admin/dropdown/financial/receipt/admin_receipt_links.tpl b/web/WEB-INF/resources/tags/admin/dropdown/financial/receipt/admin_receipt_links.tpl deleted file mode 100644 index c6b3f5f1..00000000 --- a/web/WEB-INF/resources/tags/admin/dropdown/financial/receipt/admin_receipt_links.tpl +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/web/WEB-INF/resources/tags/admin/dropdown/financial/receipt_item/admin_receipt_item_links.tpl b/web/WEB-INF/resources/tags/admin/dropdown/financial/receipt_item/admin_receipt_item_links.tpl deleted file mode 100644 index e3fd9ca6..00000000 --- a/web/WEB-INF/resources/tags/admin/dropdown/financial/receipt_item/admin_receipt_item_links.tpl +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl b/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl index 26dd238f..6a8733d2 100644 --- a/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl +++ b/web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl @@ -31,7 +31,7 @@ - + + + + + + + + + + + + + + diff --git a/web/admin/financial/receipt_item/admin_receipt_item_list.xhtml b/web/admin/financial/receipt_item/admin_receipt_item_list.xhtml index b5d60a10..e3c0224b 100644 --- a/web/admin/financial/receipt_item/admin_receipt_item_list.xhtml +++ b/web/admin/financial/receipt_item/admin_receipt_item_list.xhtml @@ -230,7 +230,32 @@ headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}" sortable="false" > - + + + + + + + + + + + + + + -- 2.39.5