Roland Haeder [Fri, 29 Apr 2016 20:16:04 +0000 (22:16 +0200)]
The customer is now differently created, first you need to get the contact-relevant data from the contact controller, then you need to generate a customer number and attach the contact instance to it.
Method addCustomer(customer) was no need for calling external as the event does the same job.
Roland Häder [Fri, 29 Apr 2016 13:43:26 +0000 (15:43 +0200)]
Continued a bit:
- renamed method changeUserData() to editUserData() (members sorted)
- surpressed some warnings that are not being fixed
- clear() needs to be called
Roland Häder [Fri, 29 Apr 2016 13:16:16 +0000 (15:16 +0200)]
Continued with customer:
- editing customer data is "basicly finished"
- removed i18n key as this was not following convention (and redundant)
- a user entry was not found (for users more clear)
Roland Häder [Fri, 29 Apr 2016 09:46:33 +0000 (11:46 +0200)]
Continued with contacts:
- showing contact data is "basicly finished"
- introduced template admin_contact_data.tpl"
- added missing navigation cases
- contact personal data is not user - fixed
- include always gender
- added new page for deleting contact data
- added CSS class for delete buttons
- added template for administrative contact links
- added missing i18n strings
Roland Häder [Thu, 28 Apr 2016 12:17:13 +0000 (14:17 +0200)]
Continued with customers and rewrite a bit:
- page show_customer "basicly finished"
- removed double redundant i18n strings (no need)
- added customer's i18n strings (admin)
- now always handle a contact to "cellhpone templates", this is much easier and users/customers don't have cellphones/land-line or fax numbers, only contacts
- added template for administrative links for customers (similar to users)
- added missing navigation rules
Roland Häder [Thu, 28 Apr 2016 09:15:29 +0000 (11:15 +0200)]
Continued with customer:
- added converter for customerId <-> Customer object
- used this in administrative customer pages
- added method copyCustomerToController()
- added getter/setter for customer in helper bean
- some messages fixed (copy-paste)
Roland Häder [Wed, 27 Apr 2016 15:40:49 +0000 (17:40 +0200)]
Continued:
- the email address is now optional (nullable), so updated all i18n strings
- moved data check to createContactInstance()
- added message about minimum data
Roland Häder [Wed, 27 Apr 2016 15:01:22 +0000 (17:01 +0200)]
Continued with contacts:
- added method addContact()
- introduced isSameContactFound() which checks if the given contact can be found in a list.
- this method can later be moved to ContactUtils to become generic.
- commented out noisy System.out messages
- removed no longer used logger messages
Roland Häder [Wed, 27 Apr 2016 14:25:53 +0000 (16:25 +0200)]
Some JSF fiyxes:
- id "cellphoneLinks" removed as it happens in a loop
- sometimes user is null, then user.userContact cannot be accessed and any attempts cause a NPE
- new error message ERROR_PARAMETER_CELLPHONE_NUMBER_USER_NOT_SET added (and used)
- added div tags for better showing error messages
Roland Häder [Wed, 27 Apr 2016 12:15:17 +0000 (14:15 +0200)]
Continued with observers:
- added afterAdminAddedCustomer() to add contact to list
- commented out noisy debug lines
- clear() is still needed for request-scoped to remove the form data
- no need for explicit clear() call as the observer does it
- removed some commented out log messages
Roland Häder [Wed, 27 Apr 2016 10:02:05 +0000 (12:02 +0200)]
Continued a bit:
- added additional check if the contact is really in the selectableContacts list
- need to call EJB business method linkCustomer() (like for users, linkUser())
- customers don't have user profiles: customer != user
Roland Häder [Wed, 27 Apr 2016 08:54:32 +0000 (10:54 +0200)]
Refactured a lot:
- administrative controller are request-scoped, therefor their "cached" lists are never cached for a longer time. So all lists has to be moved to general controllers
- added new general customer bean for above refacturing
Roland Häder [Wed, 27 Apr 2016 06:52:40 +0000 (08:52 +0200)]
Continued with contacts:
- added hasContacts() / allContacts()
- listing of contacts started, maybe later add a method that checks where the contact is being used and returns a message key?
Roland Häder [Tue, 26 Apr 2016 15:57:13 +0000 (17:57 +0200)]
Continued a lot more:
- added ability to link any contact with user and/or customer accounts (later is unfinished)
- to make thism working, a controller method selectableContacts() is needed (cached)
- also the event for administrators adding users (customers missing!) must be observed to remove contact from selectable list
- because of the above, the HTML form can no longer validate required="true", it must be done by the controller (ugly exceptions for now)
- some beans/controllers loaded/injected
- added missing i18n strings
- fixed some exception messages
- ignored strings for i18n
- changed CSS class in admin area pages from small to medium (needs more space)
- removed double underscore (one removed)
Roland Häder [Mon, 25 Apr 2016 16:19:28 +0000 (18:19 +0200)]
Continued with customer:
- injected administrative contact controller
- added unfinished implementation of addCustomer()
- added private isCustomerDataSet()
- localContact was wrong here
- personal data is now together (better overview)
- added createContactInstance()
Roland Häder [Mon, 25 Apr 2016 13:37:38 +0000 (15:37 +0200)]
Continued with administrative customer stuff:
- added loading of full customer list on post-init phase
- added EJB (remote interface) for calling customer business methods
- added new depencies jcustomer-core/jcustomer-lib
Roland Häder [Fri, 22 Apr 2016 14:20:11 +0000 (16:20 +0200)]
Continued with rewriting:
- rewrote to ContactUtils.updateFooNumber()
- added missing attributes for above functions
- added check for contactId against null
- fixed converter (must be ContactConverter) + instance from helper
- edit_contact title is now a pattern with id number as only parameter
- adminUserController was wrong, use adminContactController for contact-relevant stuff
- added missing i18n strings
Roland Haeder [Fri, 22 Apr 2016 13:54:24 +0000 (15:54 +0200)]
Continued with rewriting:
- rewrote to ContactUtils.updateFooNumber()
- added missing attributes for above functions
- added check for contactId against null
- fixed converter (must be ContactConverter) + instance from helper
Roland Häder [Fri, 22 Apr 2016 07:52:57 +0000 (09:52 +0200)]
Continued a bit:
- added observer method afterAdminUpdatedContactDataEvent() to update contact and email lists
- no contact list in admin controller as the same exists in general controller
- imports cleaned up
Roland Häder [Thu, 21 Apr 2016 11:55:57 +0000 (13:55 +0200)]
Contiuned with editing user data/rewrites:
- implemented editUserData() for when admin updates user data
- implemented listener for when a user updates personal data
- added private method updateList() for updating admin's user list
- updateUserPersonalData() now returns updated user instance (detached!)
- fired event when user updates personal data
Roland Häder [Thu, 21 Apr 2016 08:38:05 +0000 (10:38 +0200)]
Continued:
- splitted admin user form template into user and contact
- used that new admin user form template for editing user data
- added controller method editUserData()
- renamed relevant language keys (as they are not just for adding users)
Roland Häder [Wed, 20 Apr 2016 15:09:16 +0000 (17:09 +0200)]
Continued a bit:
- All optional data is now checked with "instanceof"
- added logging messages (direct output)
- maybe put the copy command here? (was not called)
- ignored strings for i18n
Roland Häder [Wed, 20 Apr 2016 14:15:51 +0000 (16:15 +0200)]
Continued with refacturing:
- added new controller for contact (general + admin)
- removed all contact-related stuff from user controller (as there are specific ones)
- login_data_saved splitted into login_user_data_saved and login_contact_data_saved
- fixed relevant temnplates (contact controller)
Roland Häder [Tue, 19 Apr 2016 15:55:11 +0000 (17:55 +0200)]
Continued with refacturing:
- added general admin helper for just holding objects
- used that new helper for user instance to have auto-completition back
- updated properties