]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Fri, 17 Apr 2020 14:59:29 +0000 (16:59 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 17 Apr 2020 14:59:29 +0000 (16:59 +0200)
- 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 <roland@mxchange.org>
src/java/org/mxchange/jfinancials/beans/financial/model/receipt/list/FinancialsReceiptListWebViewBean.java
src/java/org/mxchange/jfinancials/beans/financial/model/receipt_item/list/FinancialsReceiptItemListWebViewBean.java
web/WEB-INF/project-links.jsf.taglib.xml
web/WEB-INF/resources/tags/admin/dropdown/financial/receipt/admin_receipt_links.tpl [deleted file]
web/WEB-INF/resources/tags/admin/dropdown/financial/receipt_item/admin_receipt_item_links.tpl [deleted file]
web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl
web/WEB-INF/templates/user/financial/receipt/login_form_financial_receipt.tpl
web/admin/financial/receipt/admin_receipt_list.xhtml
web/admin/financial/receipt_item/admin_receipt_item_list.xhtml

index ed562fb9c941371ee3d93d383dc681f559908ee9..03b360a2729ca6a7d5805784a1f6d07d3bd36096 100644 (file)
@@ -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);
                        }
index 20c7f566b14318aa800cbd5e066b3485d2715bbb..9da906a0b61ec4560fe2fe913e068f34f434b69e 100644 (file)
@@ -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);
                        }
index 80c99e24c2d084cbab3a7d1a3b180be975e33e3b..41e073ddc2ef3459b2643bb0e5d395d6886694e9 100644 (file)
@@ -22,50 +22,4 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd"
 >
        <namespace>http://mxchange.org/jsf/jfinancials/links</namespace>
-       <tag>
-               <tag-name>outputReceiptAdminDropdownMenu</tag-name>
-               <description>This tag renders a full h:panelGroup for an administrative drop-down menu for receipt data.</description>
-               <source>resources/tags/admin/dropdown/financial/receipt/admin_receipt_links.tpl</source>
-               <attribute>
-                       <name>receipt</name>
-                       <description>The receipt instance that provides the data for this tag.</description>
-                       <required>true</required>
-                       <type>org.mxchange.jfinancials.model.receipt.BillableReceipt</type>
-               </attribute>
-               <attribute>
-                       <name>renderShowLink</name>
-                       <description>Whether this tag is used to show receipt data (default true).</description>
-                       <required>false</required>
-                       <type>java.lang.Boolean</type>
-               </attribute>
-               <attribute>
-                       <name>rendered</name>
-                       <description>Whether this tag is being rendered by JSF engine (default: true).</description>
-                       <required>false</required>
-                       <type>java.lang.Boolean</type>
-               </attribute>
-       </tag>
-       <tag>
-               <tag-name>outputReceiptItemAdminDropdownMenu</tag-name>
-               <description>This tag renders a full h:panelGroup for an administrative drop-down menu for receipt item data.</description>
-               <source>resources/tags/admin/dropdown/financial/receipt_item/admin_receipt_item_links.tpl</source>
-               <attribute>
-                       <name>receiptItem</name>
-                       <description>The receipt item instance that provides the data for this tag.</description>
-                       <required>true</required>
-                       <type>org.mxchange.jfinancials.model.receipt_item.BillableReceiptItem</type>
-               </attribute>
-               <attribute>
-                       <name>renderShowLink</name>
-                       <description>Whether this tag is used to show receipt item data (default true).</description>
-                       <required>false</required>
-                       <type>java.lang.Boolean</type>
-               </attribute>
-               <attribute>
-                       <name>rendered</name>
-                       <description>Whether this tag is being rendered by JSF engine (default: true).</description>
-                       <required>false</required>
-                       <type>java.lang.Boolean</type>
-               </attribute>
-       </tag>
 </facelet-taglib>
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 (file)
index c6b3f5f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:p="http://primefaces.org/ui"
-       >
-
-       <p:menuButton value="#{msg.OPTIONS}" rendered="#{empty rendered or rendered}">
-               <p:menuitem outcome="admin_show_receipt" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{project.ADMIN_LINK_SHOW_RECEIPT_TITLE}" rendered="#{empty renderShowLink or renderShowLink}">
-                       <f:param name="receiptId" value="#{receipt.receiptId}" />
-               </p:menuitem>
-
-               <p:menuitem outcome="admin_edit_receipt" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{project.ADMIN_LINK_EDIT_RECEIPT_TITLE}">
-                       <f:param name="receiptId" value="#{receipt.receiptId}" />
-               </p:menuitem>
-
-               <p:menuitem outcome="admin_delete_receipt">
-                       <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{project.ADMIN_LINK_DELETE_RECEIPT_TITLE}" />
-                       <f:param name="receiptId" value="#{receipt.receiptId}" />
-               </p:menuitem>
-       </p:menuButton>
-</ui:composition>
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 (file)
index e3fd9ca..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:p="http://primefaces.org/ui"
-       >
-
-       <p:menuButton value="#{msg.OPTIONS}" rendered="#{empty rendered or rendered}">
-               <p:menuitem outcome="admin_show_receipt_item" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{project.ADMIN_LINK_SHOW_RECEIPT_ITEM_TITLE}" rendered="#{empty renderShowLink or renderShowLink}">
-                       <f:param name="receiptId" value="#{receiptItem.itemId}" />
-               </p:menuitem>
-
-               <p:menuitem outcome="admin_edit_receipt_item" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{project.ADMIN_LINK_EDIT_RECEIPT_ITEM_TITLE}">
-                       <f:param name="receiptId" value="#{receiptItem.itemId}" />
-               </p:menuitem>
-
-               <p:menuitem outcome="admin_delete_receipt_item">
-                       <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{project.ADMIN_LINK_DELETE_RECEIPT_ITEM_TITLE}" />
-                       <f:param name="receiptId" value="#{receiptItem.itemId}" />
-               </p:menuitem>
-       </p:menuButton>
-</ui:composition>
index 26dd238fd5c06b5226c3a12999486c89117edfc6..6a8733d27f5864ccaef687c848fe91aa87ce7281 100644 (file)
@@ -31,7 +31,7 @@
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
 
                                <f:selectItems
-                                       value="#{branchOfficeListController.allBranchOffices()}"
+                                       value="#{branchOfficeListController.allBranchOffices}"
                                        var="branchOffice"
                                        itemValue="#{branchOffice}"
                                        itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
@@ -88,7 +88,7 @@
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
 
                                <f:selectItems
-                                       value="#{employeeController.allEmployees()}"
+                                       value="#{employeeListController.allEmployees}"
                                        var="employee"
                                        itemValue="#{employee}"
                                        itemLabel="#{beanHelper.renderEmployee(employee)}"
index dedf30ecc4a7ada27a6cad5f4ca837c8ac299d5b..949a70753dc65628652398ee15f94101b9f22974 100644 (file)
@@ -33,7 +33,7 @@
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
 
                                <f:selectItems
-                                       value="#{branchOfficeListController.allBranchOffices()}"
+                                       value="#{branchOfficeListController.allBranchOffices}"
                                        var="branchOffice"
                                        itemValue="#{branchOffice}"
                                        itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
@@ -90,7 +90,7 @@
                                <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
 
                                <f:selectItems
-                                       value="#{employeeController.allEmployees()}"
+                                       value="#{employeeListController.allEmployees}"
                                        var="companyHeadquarter"
                                        itemValue="#{companyEmployee}"
                                        itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
index ddd3de6f7dcdaf8188738be1c5fd9b07beaa6b6d..890994059c9a746fe906d821a3b7467ef64c5ca6 100644 (file)
                                                        <f:converter converterId="BranchOfficeConverter" />
 
                                                        <f:selectItems
-                                                               value="#{branchOfficeListController.allBranchOffices()}"
+                                                               value="#{branchOfficeListController.allBranchOffices}"
                                                                var="branchOffice"
                                                                itemValue="#{branchOffice}"
                                                                itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
                                                        <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
 
                                                        <f:selectItems
-                                                               value="#{employeeController.allEmployees()}"
+                                                               value="#{employeeListController.allEmployees}"
                                                                var="employee"
                                                                itemValue="#{employee}"
                                                                itemLabel="#{beanHelper.renderEmployee(employee)}"
                                        headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
                                        sortable="false"
                                        >
-                                       <pl:outputReceiptAdminDropdownMenu receipt="#{receipt}" />
+                                       <p:menuButton value="#{msg.OPTIONS}">
+                                               <p:menuitem
+                                                       outcome="admin_show_receipt"
+                                                       value="#{msg.ADMIN_LINK_SHOW_SHORT}"
+                                                       title="#{project.ADMIN_LINK_SHOW_RECEIPT_TITLE}"
+                                                       >
+                                                       <f:param name="receiptId" value="#{receipt.receiptId}" />
+                                               </p:menuitem>
+
+                                               <p:menuitem
+                                                       outcome="admin_edit_receipt"
+                                                       value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+                                                       title="#{project.ADMIN_LINK_EDIT_RECEIPT_TITLE}"
+                                                       >
+                                                       <f:param name="receiptId" value="#{receipt.receiptId}" />
+                                               </p:menuitem>
+
+                                               <p:menuitem outcome="admin_delete_receipt">
+                                                       <h:outputText
+                                                               styleClass="link-danger"
+                                                               value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+                                                               title="#{project.ADMIN_LINK_DELETE_RECEIPT_TITLE}"
+                                                               />
+                                                       <f:param name="receiptId" value="#{receipt.receiptId}" />
+                                               </p:menuitem>
+                                       </p:menuButton>
                                </p:column>
                        </p:dataTable>
 
index b5d60a1000b89091dcc64e1eb5682a274a390e4e..e3c0224b82aed87a4246ee91e1db9964975d8d2a 100644 (file)
                                        headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
                                        sortable="false"
                                        >
-                                       <pl:outputReceiptItemAdminDropdownMenu receiptItem="#{receiptItem}" />
+                                       <p:menuButton value="#{msg.OPTIONS}">
+                                               <p:menuitem
+                                                       outcome="admin_show_receipt_item"
+                                                       value="#{msg.ADMIN_LINK_SHOW_SHORT}"
+                                                       title="#{project.ADMIN_LINK_SHOW_RECEIPT_ITEM_TITLE}"
+                                                       >
+                                                       <f:param name="receiptId" value="#{receiptItem.itemId}" />
+                                               </p:menuitem>
+
+                                               <p:menuitem
+                                                       outcome="admin_edit_receipt_item"
+                                                       value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+                                                       title="#{project.ADMIN_LINK_EDIT_RECEIPT_ITEM_TITLE}"
+                                                       >
+                                                       <f:param name="receiptId" value="#{receiptItem.itemId}" />
+                                               </p:menuitem>
+
+                                               <p:menuitem outcome="admin_delete_receipt_item">
+                                                       <h:outputText
+                                                               styleClass="link-danger"
+                                                               value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+                                                               title="#{project.ADMIN_LINK_DELETE_RECEIPT_ITEM_TITLE}"
+                                                               />
+                                                       <f:param name="receiptId" value="#{receiptItem.itemId}" />
+                                               </p:menuitem>
+                                       </p:menuButton>
                                </p:column>
                        </p:dataTable>