From: Roland Häder Date: Fri, 17 Apr 2020 14:58:31 +0000 (+0200) Subject: Product-only: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=132833660be5b95dfb8a2ef9adda79dcd94282da;p=jfinancials-war.git Product-only: - 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 Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jfinancials/beans/generic_product/list/FinancialsProductListWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/generic_product/list/FinancialsProductListWebViewBean.java index 363bad42..45fbd855 100644 --- a/src/java/org/mxchange/jfinancials/beans/generic_product/list/FinancialsProductListWebViewBean.java +++ b/src/java/org/mxchange/jfinancials/beans/generic_product/list/FinancialsProductListWebViewBean.java @@ -217,7 +217,7 @@ public class FinancialsProductListWebViewBean extends BaseFinancialsBean impleme // Is cache there? if (!this.productCache.iterator().hasNext()) { // "Walk" through all entries and add to cache - for (final Product product : this.productBean.allProducts()) { + for (final Product product : this.productBean.fetchAllProducts()) { // Add it by primary key this.productCache.put(product.getProductId(), product); } diff --git a/src/java/org/mxchange/jfinancials/beans/product_category/list/FinancialsCategoryListWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/product_category/list/FinancialsCategoryListWebViewBean.java index 9b2b22a8..bd850fc3 100644 --- a/src/java/org/mxchange/jfinancials/beans/product_category/list/FinancialsCategoryListWebViewBean.java +++ b/src/java/org/mxchange/jfinancials/beans/product_category/list/FinancialsCategoryListWebViewBean.java @@ -192,7 +192,7 @@ public class FinancialsCategoryListWebViewBean extends BaseFinancialsBean implem // Is cache there? if (!this.categoryCache.iterator().hasNext()) { // "Walk" through all entries and add to cache - for (final Category category : this.categoryBean.allCategories()) { + for (final Category category : this.categoryBean.fetchAllCategories()) { // Add it by primary key this.categoryCache.put(category.getCategoryId(), category); } diff --git a/web/WEB-INF/product-links.jsf.taglib.xml b/web/WEB-INF/product-links.jsf.taglib.xml index 711698d9..49556a1e 100644 --- a/web/WEB-INF/product-links.jsf.taglib.xml +++ b/web/WEB-INF/product-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/jproduct/links - - outputProductCategoryAdminDropdownMenu - This tag renders an administrative drop-down menu for given category instance. - resources/tags/admin/dropdown/product_category/admin_product_category_links.tpl - - category - The product category instance that provides the data for this tag. - true - org.mxchange.jproduct.model.category.Category - - - renderShowLink - Whether to render (default: true) "show product" link. - false - java.langBoolean - - - rendered - Whether this tag is being rendered by JSF engine (default: true). - false - java.lang.Boolean - - - - outputGenericProductAdminDropdownMenu - This tag renders an administrative drop-down menu for given product instance. - resources/tags/admin/dropdown/generic_product/admin_generic_product_links.tpl - - genericProduct - The generic product instance that provides the data for this tag. - true - org.mxchange.jproduct.model.product.Product - - - renderShowLink - Whether to render (default: true) "show product" link. - false - java.langBoolean - - - 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/generic_product/admin_generic_product_links.tpl b/web/WEB-INF/resources/tags/admin/dropdown/generic_product/admin_generic_product_links.tpl deleted file mode 100644 index 7b1ede12..00000000 --- a/web/WEB-INF/resources/tags/admin/dropdown/generic_product/admin_generic_product_links.tpl +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/web/WEB-INF/resources/tags/admin/dropdown/product_category/admin_product_category_links.tpl b/web/WEB-INF/resources/tags/admin/dropdown/product_category/admin_product_category_links.tpl deleted file mode 100644 index 182bab72..00000000 --- a/web/WEB-INF/resources/tags/admin/dropdown/product_category/admin_product_category_links.tpl +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/web/admin/generic_product/admin_generic_product_list.xhtml b/web/admin/generic_product/admin_generic_product_list.xhtml index bdbd0013..4f6c290f 100644 --- a/web/admin/generic_product/admin_generic_product_list.xhtml +++ b/web/admin/generic_product/admin_generic_product_list.xhtml @@ -253,7 +253,32 @@ sortable="false" filterable="false" > - + + + + + + + + + + + + + + diff --git a/web/admin/product_category/admin_product_category_list.xhtml b/web/admin/product_category/admin_product_category_list.xhtml index 8e0c0dc9..ee96d9f2 100644 --- a/web/admin/product_category/admin_product_category_list.xhtml +++ b/web/admin/product_category/admin_product_category_list.xhtml @@ -171,7 +171,32 @@ sortable="false" filterable="false" > - + + + + + + + + + + + + + +