]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Don't cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 23 Apr 2020 01:29:33 +0000 (03:29 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 23 Apr 2020 01:29:33 +0000 (03:29 +0200)
- some renderFoo() methods have extra parameters, added
- in converters/validators now the FOO_LIST_CONTROLLER static instance shall
  always be initialized directly before the try{} block

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/converter/financial/receipt/FinancialsReceiptConverter.java
web/WEB-INF/templates/admin/financial/receipt/admin_form_financial_receipt.tpl
web/WEB-INF/templates/admin/financial/receipt_item/admin_form_financial_receipt_item.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 a649e4839fcf78799fad0f8f9b968b60aec1b5db..37686d9ff91d686b82cf1c6b77362e6c941ba03e 100644 (file)
@@ -42,12 +42,6 @@ public class FinancialsReceiptConverter implements Converter<BillableReceipt> {
 
        @Override
        public BillableReceipt getAsObject (final FacesContext context, final UIComponent component, final String submittedValue) {
-               // Is the instance there?
-               if (null == RECEIPT_LIST_CONTROLLER) {
-                       // Get bean from CDI directly
-                       RECEIPT_LIST_CONTROLLER = CDI.current().select(FinancialsReceiptListWebViewBean.class).get();
-               }
-
                // Is the value null or empty?
                if ((null == submittedValue) || (submittedValue.trim().isEmpty())) {
                        // Warning message
@@ -60,6 +54,12 @@ public class FinancialsReceiptConverter implements Converter<BillableReceipt> {
                // Init instance
                BillableReceipt receipt = null;
 
+               // Is the instance there?
+               if (null == RECEIPT_LIST_CONTROLLER) {
+                       // Get bean from CDI directly
+                       RECEIPT_LIST_CONTROLLER = CDI.current().select(FinancialsReceiptListWebViewBean.class).get();
+               }
+
                try {
                        // Try to parse the value as long
                        final Long receiptId = Long.valueOf(submittedValue);
index ab4331bb0ac8a05e394663a7e26fdd048040045c..4d2486c11c137918802474c5a75fc15f22829b4a 100644 (file)
@@ -34,7 +34,7 @@
                                        value="#{branchOfficeListController.allBranchOffices}"
                                        var="branchOffice"
                                        itemValue="#{branchOffice}"
-                                       itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+                                       itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
                                        />
                        </p:selectOneMenu>
 
@@ -91,8 +91,8 @@
                                        value="#{employeeListController.allEmployees}"
                                        var="employee"
                                        itemValue="#{employee}"
-                                       itemLabel="#{beanHelper.renderEmployee(employee)}"
-                                       itemDescription="#{beanHelper.renderBasicData(employee.employeeBasicData, true)}, #{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}"
+                                       itemLabel="#{beanHelper.renderEmployee(employee, false)}"
+                                       itemDescription="#{beanHelper.renderBasicData(employee.employeeBasicData, true, true)}, #{beanHelper.renderBranchOffice(employee.employeeBranchOffice, true)}"
                                        />
                        </p:selectOneMenu>
 
index 4d9d0815398db8c4713bf366a94f6d050448cd63..18ff60bec389892dedd9f5d4af98b00669f5e484 100644 (file)
@@ -74,7 +74,7 @@
                                        value="#{basicDataListController.allBasicData}"
                                        var="basicData"
                                        itemValue="#{basicData}"
-                                       itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                       itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
                                        />
                        </p:selectOneMenu>
 
index ad8f09855f161b4eb6554d6d9c884b540e2a44d0..904cbcf7b23e7737782bb9915865c95e94fb3f77 100644 (file)
@@ -36,7 +36,7 @@
                                        value="#{branchOfficeListController.allBranchOffices}"
                                        var="branchOffice"
                                        itemValue="#{branchOffice}"
-                                       itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+                                       itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
                                        />
                        </p:selectOneMenu>
                        <p:message for="branchOffice" />
@@ -93,7 +93,7 @@
                                        value="#{employeeListController.allEmployees}"
                                        var="companyHeadquarter"
                                        itemValue="#{companyEmployee}"
-                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee)}"
+                                       itemLabel="#{beanHelper.renderEmployee(companyEmployee, false)}"
                                        />
                        </p:selectOneMenu>
                        <p:message for="receiptSellerEmployee" />
index 62cb94edae3b49be24863004f97ced3c2cecf539..01c19fe92672f341e41ab18c39cf556e206fc513 100644 (file)
                                                                value="#{branchOfficeListController.allBranchOffices}"
                                                                var="branchOffice"
                                                                itemValue="#{branchOffice}"
-                                                               itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
+                                                               itemLabel="#{beanHelper.renderBranchOffice(branchOffice, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_branch_office"
-                                               value="#{beanHelper.renderBranchOffice(receipt.receiptBranchOffice)}"
+                                               value="#{beanHelper.renderBranchOffice(receipt.receiptBranchOffice, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
                                                >
                                                <f:param name="branchId" value="#{receipt.receiptBranchOffice.branchId}" />
                                                                value="#{employeeListController.allEmployees}"
                                                                var="employee"
                                                                itemValue="#{employee}"
-                                                               itemLabel="#{beanHelper.renderEmployee(employee)}"
+                                                               itemLabel="#{beanHelper.renderEmployee(employee, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_employee"
-                                               value="#{beanHelper.renderEmployee(receipt.receiptSellerEmployee)}"
+                                               value="#{beanHelper.renderEmployee(receipt.receiptSellerEmployee, false)}"
                                                title="#{project.ADMIN_LINK_SHOW_RECEIPT_SELLER_EMPLOYEE_TITLE}"
                                                rendered="#{not empty receipt.receiptSellerEmployee}"
                                                >
                                                <p:outputLabel value="#{msg.BRANCH_OFFICE}" title="#{project.ASSIGNED_RECEIPT_BRANCH_OFFICE_TITLE}" />
                                                <p:link
                                                        outcome="admin_show_branch_office"
-                                                       value="#{beanHelper.renderBranchOffice(receiptListController.selectedReceipt.receiptBranchOffice)}"
+                                                       value="#{beanHelper.renderBranchOffice(receiptListController.selectedReceipt.receiptBranchOffice, true)}"
                                                        title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
                                                        >
                                                        <f:param name="branchId" value="#{receiptListController.selectedReceipt.receiptBranchOffice.branchId}" />
                                                <p:outputLabel value="#{project.SELLER_HEADER}" title="#{project.ASSIGNED_RECEIPT_SELLER_TITLE}" />
                                                <p:link
                                                        outcome="admin_show_employee"
-                                                       value="#{beanHelper.renderEmployee(receiptListController.selectedReceipt.receiptSellerEmployee)}"
+                                                       value="#{beanHelper.renderEmployee(receiptListController.selectedReceipt.receiptSellerEmployee, true)}"
                                                        title="#{project.ADMIN_LINK_SHOW_RECEIPT_SELLER_EMPLOYEE_TITLE}"
                                                        rendered="#{not empty receiptListController.selectedReceipt.receiptSellerEmployee}"
                                                        >
index a25f9e32ffdf0f13af6f08327b74115afd16a5db..d0680bb1b50876e486a661a124ed403fb048c86b 100644 (file)
                                                                value="#{basicDataListController.allBasicData}"
                                                                var="basicData"
                                                                itemValue="#{basicData}"
-                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+                                                               itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
                                                                />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
 
                                        <p:link
                                                outcome="admin_show_basic_data"
-                                               value="#{beanHelper.renderBasicData(receiptItem.itemManufacturer, true)}"
+                                               value="#{beanHelper.renderBasicData(receiptItem.itemManufacturer, true, false)}"
                                                title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
                                                rendered="#{not empty receiptItem.itemManufacturer}"
                                                >