]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
it is beanHelper, not just adminHelper
authorRoland Haeder <roland@mxchange.org>
Fri, 14 Jul 2017 12:42:04 +0000 (14:42 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 22 Jul 2017 22:31:57 +0000 (00:31 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java
web/admin/customer/admin_customer_delete.xhtml
web/admin/customer/admin_customer_edit.xhtml
web/admin/customer/admin_customer_list.xhtml
web/admin/customer/admin_customer_show.xhtml

index c54df4fa147b78d8bf1b8e2babe0f94adc380ed6..eda423acf58812cda6af1494839cb9c2c466deeb 100644 (file)
@@ -70,7 +70,7 @@ public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implem
         * Bean helper instance
         */
        @Inject
-       private PizzaWebRequestHelperController adminHelper;
+       private PizzaWebRequestHelperController beanHelper;
 
        /**
         * An event being fired when an administrator has added a new customer
@@ -105,7 +105,7 @@ public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implem
        @Override
        public String addCustomer () {
                // Are at least some fields added?
-               if ((this.adminHelper.getContact() == null) && (!this.isCustomerDataSet())) {
+               if ((this.beanHelper.getContact() == null) && (!this.isCustomerDataSet())) {
                        // Not all customer data is set
                        throw new FaceletException("Please provide minimum personal data: gender, first_name, family_name"); //NOI18N
                }
@@ -114,9 +114,9 @@ public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implem
                Contact contact;
 
                // Is the contact set in helper?
-               if (this.adminHelper.getContact() instanceof Contact) {
+               if (this.beanHelper.getContact() instanceof Contact) {
                        // Get from helper
-                       contact = this.adminHelper.getContact();
+                       contact = this.beanHelper.getContact();
                } else {
                        // Get new contact instance
                        contact = this.adminContactController.createContactInstance();
@@ -133,12 +133,12 @@ public class PizzaAdminCustomerWebRequestBean extends BasePizzaController implem
 
                try {
                        // Add/link customer and return updated
-                       if (this.adminHelper.getContact() instanceof Contact) {
+                       if (this.beanHelper.getContact() instanceof Contact) {
                                // Link customer
                                updatedCustomer = this.adminCustomerBean.linkCustomer(customer);
 
                                // Remove contact instance
-                               this.adminHelper.setContact(null);
+                               this.beanHelper.setContact(null);
                        } else {
                                // Add new customer instance
                                updatedCustomer = this.adminCustomerBean.addCustomer(customer);
index 96ea5af1a249a78aa0a4ef8858810abba5acfacc..97a00feec9620e07af68c2c8f0c91a12a7b40367 100644 (file)
@@ -9,8 +9,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="customerId" value="#{adminHelper.customer}" converter="CustomerConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyCustomerToController()}" />
+               <f:viewParam name="customerId" value="#{beanHelper.customer}" converter="CustomerConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyCustomerToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
index c7c6d80280a86d754f6906c0b989a2e4ead874ce..31f92a8eeadbac8c7a5bebd17d04f9adf3c357ef 100644 (file)
@@ -9,8 +9,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="customerId" value="#{adminHelper.customer}" converter="CustomerConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyCustomerToController()}" />
+               <f:viewParam name="customerId" value="#{beanHelper.customer}" converter="CustomerConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyCustomerToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
@@ -23,9 +23,9 @@
                </ui:define>
 
                <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.customer}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.customer}" />
 
-                       <h:form id="form_admin_edit_customer" rendered="#{not empty adminHelper.customer}">
+                       <h:form id="form_admin_edit_customer" rendered="#{not empty beanHelper.customer}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputText value="#{msg.ADMIN_EDIT_USER_TITLE}" />
index 91d0bdc81e73e9647f747dab2ed05d4fc174fe48..4dce8ecbd8a30bf6ec4613599b1d2d0db70f553e 100644 (file)
@@ -98,7 +98,7 @@
                                                                </div>
 
                                                                <div class="table_right_medium">
-                                                                       <h:selectOneMenu class="select" id="customerContact" value="#{adminHelper.contact}" converter="ContactConverter">
+                                                                       <h:selectOneMenu class="select" id="customerContact" value="#{beanHelper.contact}" converter="ContactConverter">
                                                                                <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
                                                                                <f:selectItems value="#{customerController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
                                                                        </h:selectOneMenu>
index c056eca9f096bb3cf938ab3fb2640ed74c5be1ed..d73f4624bbda9ef3f0947de7e30c29c36e54e1a2 100644 (file)
@@ -9,8 +9,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="customerId" value="#{adminHelper.customer}" converter="CustomerConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyCustomerToController()}" />
+               <f:viewParam name="customerId" value="#{beanHelper.customer}" converter="CustomerConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyCustomerToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
                </ui:define>
 
                <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.customer}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.customer}" />
 
-                       <h:panelGrid id="customer_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty adminHelper.customer}">
+                       <h:panelGrid id="customer_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty beanHelper.customer}">
                                <f:facet name="header">
                                        <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">
-                                               <f:param value="#{adminHelper.customer.customerId}" />
+                                               <f:param value="#{beanHelper.customer.customerId}" />
                                        </h:outputFormat>
                                </f:facet>
 
                                <h:column>
                                        <h:outputLabel for="customerId" styleClass="data_label" value="#{msg.ADMIN_USER_ID}" />
 
-                                       <h:outputText id="customerId" styleClass="data_field" value="#{adminHelper.customer.customerId}" />
+                                       <h:outputText id="customerId" styleClass="data_field" value="#{beanHelper.customer.customerId}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="customerName" styleClass="data_label" value="#{msg.ADMIN_USER_NUMBER}" />
 
-                                       <h:outputText id="customerName" styleClass="data_field" value="#{adminHelper.customer.customerNumber}" />
+                                       <h:outputText id="customerName" styleClass="data_field" value="#{beanHelper.customer.customerNumber}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="customerCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CREATED}" />
 
-                                       <h:outputText id="customerCreated" styleClass="data_field" value="#{adminHelper.customer.customerCreated.time}">
+                                       <h:outputText id="customerCreated" styleClass="data_field" value="#{beanHelper.customer.customerCreated.time}">
                                                <f:convertDateTime for="customerCreated" type="both" />
                                        </h:outputText>
                                </h:column>
@@ -55,7 +55,7 @@
                                <h:column>
                                        <h:outputLabel for="customerUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_UPDATED}" />
 
-                                       <h:outputText id="customerUpdated" styleClass="data_field" value="#{adminHelper.customer.customerUpdated.time}">
+                                       <h:outputText id="customerUpdated" styleClass="data_field" value="#{beanHelper.customer.customerUpdated.time}">
                                                <f:convertDateTime for="customerUpdated" type="both" />
                                        </h:outputText>
                                </h:column>
                                <h:column>
                                        <h:outputLabel for="customerAccountStatus" styleClass="data_label" value="#{msg.ADMIN_USER_ACCOUNT_STATUS}" />
 
-                                       <h:outputText id="customerAccountStatus" styleClass="data_field #{adminHelper.customer.customerAccountStatus.styleClass}" value="#{msg[adminHelper.customer.customerAccountStatus.messageKey]}" />
+                                       <h:outputText id="customerAccountStatus" styleClass="data_field #{beanHelper.customer.customerAccountStatus.styleClass}" value="#{msg[beanHelper.customer.customerAccountStatus.messageKey]}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="customerLastLocked" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED}" />
 
-                                       <h:outputText id="customerLastLocked" styleClass="data_field" value="#{adminHelper.customer.customerLastLocked.time}">
+                                       <h:outputText id="customerLastLocked" styleClass="data_field" value="#{beanHelper.customer.customerLastLocked.time}">
                                                <f:convertDateTime for="customerLastLocked" type="both" />
                                        </h:outputText>
                                </h:column>
                                <h:column>
                                        <h:outputLabel for="customerLastLockedReason" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" />
 
-                                       <h:outputText id="customerLastLockedReason" styleClass="data_field" value="#{adminHelper.customer.customerLastLockedReason}" />
+                                       <h:outputText id="customerLastLockedReason" styleClass="data_field" value="#{beanHelper.customer.customerLastLockedReason}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_CREATED}" />
 
-                                       <h:outputText id="contactCreated" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactCreated.time}">
+                                       <h:outputText id="contactCreated" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactCreated.time}">
                                                <f:convertDateTime for="contactCreated" type="both" />
                                        </h:outputText>
                                </h:column>
@@ -91,7 +91,7 @@
                                <h:column>
                                        <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_UPDATED}" />
 
-                                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactUpdated.time}">
+                                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactUpdated.time}">
                                                <f:convertDateTime for="contactUpdated" type="both" />
                                        </h:outputText>
                                </h:column>
                                <h:column>
                                        <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
 
-                                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{adminHelper.customer.customerContact.isOwnContact()}" />
+                                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{beanHelper.customer.customerContact.isOwnContact()}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
 
-                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[adminHelper.customer.customerContact.contactGender.messageKey]}" />
+                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[beanHelper.customer.customerContact.contactGender.messageKey]}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
 
-                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactTitle}" />
+                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactTitle}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
 
-                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactFirstName}" />
+                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactFirstName}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
 
-                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactFamilyName}" />
+                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactFamilyName}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />
 
-                                       <h:outputText id="contactStreet" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactStreet}" />
+                                       <h:outputText id="contactStreet" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactStreet}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
 
-                                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactHouseNumber}" />
+                                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactHouseNumber}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
 
-                                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactZipCode}" />
+                                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactZipCode}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />
 
-                                       <h:outputText id="contactCity" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactCity}" />
+                                       <h:outputText id="contactCity" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactCity}" />
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
 
-                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{adminHelper.customer.customerContact.contactEmailAddress}">
-                                               <h:outputText value="#{adminHelper.customer.customerContact.contactEmailAddress}" />
+                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{beanHelper.customer.customerContact.contactEmailAddress}">
+                                               <h:outputText value="#{beanHelper.customer.customerContact.contactEmailAddress}" />
                                        </h:outputLink>
                                </h:column>
 
                                <h:column>
                                        <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
 
-                                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{adminHelper.customer.customerContact.contactBirthday.time}">
+                                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{beanHelper.customer.customerContact.contactBirthday.time}">
                                                <f:convertDateTime for="contactBirthday" type="date" />
                                        </h:outputText>
                                </h:column>
 
                        <div>
                                <ui:include src="/WEB-INF/templates/admin/customer/admin_customer_links.tpl">
-                                       <ui:param name="customer" value="#{adminHelper.customer}" />
+                                       <ui:param name="customer" value="#{beanHelper.customer}" />
                                </ui:include>
                        </div>
 
                        <div>
                                <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">
-                                       <ui:param name="mobileNumber" value="#{adminHelper.customer.customerContact.contactCellphoneNumber}" />
-                                       <ui:param name="contact" value="#{adminHelper.customer.customerContact}" />
+                                       <ui:param name="mobileNumber" value="#{beanHelper.customer.customerContact.contactCellphoneNumber}" />
+                                       <ui:param name="contact" value="#{beanHelper.customer.customerContact}" />
                                </ui:include>
                        </div>
                </ui:define>