import javax.enterprise.event.Event;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
+import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
import org.mxchange.jcontacts.events.contact.created.ObservableCreatedContactEvent;
+import org.mxchange.jcontacts.events.contact.deleted.AdminDeletedContactEvent;
+import org.mxchange.jcontacts.events.contact.deleted.ObservableAdminDeletedContactEvent;
import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
+import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
import org.mxchange.jcontacts.model.contact.AdminContactSessionBeanRemote;
import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontacts.model.contact.ContactSessionBeanRemote;
*/
private String comment;
+ /**
+ * Current contact instance
+ */
+ private Contact contact;
+
/**
* EJB for general contact purposes
*/
@Inject
private JobsContactListWebViewController contactListController;
+ /**
+ * Event being fired when an administrator has deleted a contact
+ */
+ @Any
+ @Inject
+ private Event<ObservableAdminDeletedContactEvent> deletedContactEvent;
+
/**
* Email address
*/
}
// Create new contact instance
- final Contact contact = this.createContactInstance();
+ final Contact createdContact = this.createContactInstance();
// Default is not same contact
- if (this.contactListController.isContactFound(contact)) {
+ if (this.contactListController.isContactFound(createdContact)) {
// Already registered
- throw new FaceletException(new ContactAlreadyAddedException(contact));
+ throw new FacesException(new ContactAlreadyAddedException(createdContact));
}
// Init contact
// Try to call EJB
try {
// Call EJB
- updatedContact = this.adminContactBean.addContact(contact);
+ updatedContact = this.adminContactBean.addContact(createdContact);
} catch (final ContactAlreadyAddedException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
throw new IllegalStateException(MessageFormat.format("event.createdContact.contactId={0} is not valid.", event.getCreatedContact().getContactId())); //NOI18N
}
+ // Set contact for e.g. delete method
+ this.setContact(event.getCreatedContact());
+
// Get contact instance from event
- final Contact contact = event.getCreatedContact();
+ final Contact createdContact = event.getCreatedContact();
// Set all fields: contact
- this.setContactId(contact.getContactId());
- this.setAcademicTitle(contact.getContactTitle());
- this.setBirthday(contact.getContactBirthday());
- this.setCity(contact.getContactCity());
- this.setComment(contact.getContactComment());
- this.setContactCountry(contact.getContactCountry());
- this.setEmailAddress(contact.getContactEmailAddress());
- this.setFamilyName(contact.getContactFamilyName());
- this.setFirstName(contact.getContactFirstName());
- this.setPersonalTitle(contact.getContactPersonalTitle());
- this.setHouseNumber(contact.getContactHouseNumber());
- this.setHouseNumberExtension(contact.getContactHouseNumberExtension());
- this.setStreet(contact.getContactStreet());
- this.setZipCode(contact.getContactZipCode());
+ this.setContactId(createdContact.getContactId());
+ this.setAcademicTitle(createdContact.getContactTitle());
+ this.setBirthday(createdContact.getContactBirthday());
+ this.setCity(createdContact.getContactCity());
+ this.setComment(createdContact.getContactComment());
+ this.setContactCountry(createdContact.getContactCountry());
+ this.setEmailAddress(createdContact.getContactEmailAddress());
+ this.setFamilyName(createdContact.getContactFamilyName());
+ this.setFirstName(createdContact.getContactFirstName());
+ this.setPersonalTitle(createdContact.getContactPersonalTitle());
+ this.setHouseNumber(createdContact.getContactHouseNumber());
+ this.setHouseNumberExtension(createdContact.getContactHouseNumberExtension());
+ this.setStreet(createdContact.getContactStreet());
+ this.setZipCode(createdContact.getContactZipCode());
// Is the cell phone set?
- if (contact.getContactMobileNumber() instanceof DialableMobileNumber) {
+ if (createdContact.getContactMobileNumber() instanceof DialableMobileNumber) {
// ... cmobile data
- this.setMobileId(contact.getContactMobileNumber().getMobileId());
- this.setMobileProvider(contact.getContactMobileNumber().getMobileProvider());
- this.setMobileNumber(contact.getContactMobileNumber().getMobileNumber());
+ this.setMobileId(createdContact.getContactMobileNumber().getMobileId());
+ this.setMobileProvider(createdContact.getContactMobileNumber().getMobileProvider());
+ this.setMobileNumber(createdContact.getContactMobileNumber().getMobileNumber());
}
// Is the fax set?
- if (contact.getContactFaxNumber() instanceof DialableFaxNumber) {
+ if (createdContact.getContactFaxNumber() instanceof DialableFaxNumber) {
// ... fax data
- this.setFaxId(contact.getContactFaxNumber().getPhoneId());
- this.setFaxAreaCode(contact.getContactFaxNumber().getPhoneAreaCode());
- this.setFaxCountry(contact.getContactFaxNumber().getPhoneCountry());
- this.setFaxNumber(contact.getContactFaxNumber().getPhoneNumber());
+ this.setFaxId(createdContact.getContactFaxNumber().getPhoneId());
+ this.setFaxAreaCode(createdContact.getContactFaxNumber().getPhoneAreaCode());
+ this.setFaxCountry(createdContact.getContactFaxNumber().getPhoneCountry());
+ this.setFaxNumber(createdContact.getContactFaxNumber().getPhoneNumber());
}
// Is the land-line number set?
- if (contact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
+ if (createdContact.getContactLandLineNumber() instanceof DialableLandLineNumber) {
// .. land-line data
- this.setLandLineId(contact.getContactLandLineNumber().getPhoneId());
- this.setLandLineAreaCode(contact.getContactLandLineNumber().getPhoneAreaCode());
- this.setLandLineCountry(contact.getContactLandLineNumber().getPhoneCountry());
- this.setLandLineNumber(contact.getContactLandLineNumber().getPhoneNumber());
+ this.setLandLineId(createdContact.getContactLandLineNumber().getPhoneId());
+ this.setLandLineAreaCode(createdContact.getContactLandLineNumber().getPhoneAreaCode());
+ this.setLandLineCountry(createdContact.getContactLandLineNumber().getPhoneCountry());
+ this.setLandLineNumber(createdContact.getContactLandLineNumber().getPhoneNumber());
}
// Log message
final DialableFaxNumber fax = new FaxNumber(this.getFaxCountry(), this.getFaxAreaCode(), this.getFaxNumber());
// Create new instance
- final Contact contact = new UserContact(this.getPersonalTitle(), this.getFirstName(), this.getFamilyName());
+ final Contact localContact = new UserContact(this.getPersonalTitle(), this.getFirstName(), this.getFamilyName());
// Add all others
- contact.setContactId(this.getContactId());
- contact.setContactTitle(this.getAcademicTitle());
- contact.setContactBirthday(this.getBirthday());
- contact.setContactStreet(this.getStreet());
- contact.setContactHouseNumber(this.getHouseNumber());
- contact.setContactZipCode(this.getZipCode());
- contact.setContactCity(this.getCity());
- contact.setContactCountry(this.getContactCountry());
- contact.setContactEmailAddress(this.getEmailAddress());
- contact.setContactBirthday(this.getBirthday());
- contact.setContactComment(this.getComment());
+ localContact.setContactId(this.getContactId());
+ localContact.setContactTitle(this.getAcademicTitle());
+ localContact.setContactBirthday(this.getBirthday());
+ localContact.setContactStreet(this.getStreet());
+ localContact.setContactHouseNumber(this.getHouseNumber());
+ localContact.setContactZipCode(this.getZipCode());
+ localContact.setContactCity(this.getCity());
+ localContact.setContactCountry(this.getContactCountry());
+ localContact.setContactEmailAddress(this.getEmailAddress());
+ localContact.setContactBirthday(this.getBirthday());
+ localContact.setContactComment(this.getComment());
// Set ownContact
- contact.setContactOwnContact(Boolean.TRUE);
+ localContact.setContactOwnContact(Boolean.TRUE);
// Don't set null or wrong references
if ((landLine instanceof DialableLandLineNumber) && (landLine.getPhoneCountry() instanceof Country) && (this.getLandLineAreaCode() != null) && (this.getLandLineNumber() != null) && (this.getLandLineAreaCode() > 0) && (this.getLandLineNumber() > 0)) {
}
// Set phone number
- contact.setContactLandLineNumber(landLine);
+ localContact.setContactLandLineNumber(landLine);
}
// Don't set null or wrong references
}
// Set fax number
- contact.setContactFaxNumber(fax);
+ localContact.setContactFaxNumber(fax);
}
// Is the provider set?
}
// Set cmobile number
- contact.setContactMobileNumber(mobile);
+ localContact.setContactMobileNumber(mobile);
}
// Return it
- return contact;
+ return localContact;
+ }
+
+ /**
+ * Deletes currently chosen contact and returns to list view
+ *
+ * @return
+ */
+ public String deleteContactData () {
+ // Is contact set?
+ if (this.getContact() == null) {
+ // Throw NPE
+ throw new NullPointerException("this.contact is null");
+ } else if (this.getContact().getContactId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("this.contact.contactId is null");
+ } else if (this.getContact().getContactId() < 1) {
+ // Throw IAE
+ throw new NullPointerException(MessageFormat.format("this.contact.contactId={0} is not valid.", this.getContact().getContactId()));
+ }
+
+ try {
+ // Invoke EJB
+ this.adminContactBean.deleteContactData(this.getContact());
+ } catch (final ContactNotFoundException ex) {
+ // Throw it again
+ throw new FacesException(ex);
+ }
+
+ // Fire event
+ this.deletedContactEvent.fire(new AdminDeletedContactEvent(this.getContact()));
+
+ // Return to list view
+ return "admin_list_contact";
}
/**
*/
public void editContactData () {
// Get contact instance
- final Contact contact = this.createContactInstance();
+ final Contact createdContact = this.createContactInstance();
// Check if contact instance is in helper and valid
- if (null == contact) {
+ if (null == createdContact) {
// Throw NPE
throw new NullPointerException("beanHelper.contact is null"); //NOI18N
- } else if (contact.getContactId() == null) {
+ } else if (createdContact.getContactId() == null) {
// Throw NPE again
throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N
- } else if (contact.getContactId() < 1) {
+ } else if (createdContact.getContactId() < 1) {
// Invalid id
- throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
+ throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", createdContact.getContactId())); //NOI18N
}
// Update all data in contact
- this.updateContactData(contact);
+ this.updateContactData(createdContact);
// Call EJB for updating contact data
- final Contact updatedContact = this.contactBean.updateContactData(contact, this.isMobileNumberUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
+ final Contact updatedContact = this.contactBean.updateContactData(createdContact, this.isMobileNumberUnlinked, this.isLandLineUnlinked, this.isFaxUnlinked);
// Fire event
this.updatedContactEvent.fire(new AdminUpdatedContactEvent(updatedContact));
this.comment = comment;
}
+ /**
+ * Getter for contact instance
+ * <p>
+ * @return Contact instance
+ */
+ public Contact getContact () {
+ return this.contact;
+ }
+
+ /**
+ * Setter for contact instance
+ * <p>
+ * @param contact Contact instance
+ */
+ public void setContact (final Contact contact) {
+ this.contact = contact;
+ }
+
/**
* Getter for contactCountry instance
* <p>
*/
private void clear () {
// Clear all data
+ this.setContact(null);
+
// - personal data
this.setAcademicTitle(null);
this.setFirstName(null);
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Observes;
+import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
-import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontacts.model.contact.Contact;
// Is all required data set?
if (!this.isRequiredPersonalDataSet()) {
// No, then abort here
- throw new FaceletException(new IllegalArgumentException("Not all personal data is set, but createContactInstance() is called.")); //NOI18N
+ throw new FacesException(new IllegalArgumentException("Not all personal data is set, but createContactInstance() is called.")); //NOI18N
}
// Required personal data must be set
throw new IllegalStateException("User is not logged-in"); //NOI18N
} else if (!this.isRequiredChangePersonalDataSet()) {
// Not all required fields are set
- throw new FaceletException("Not all required fields are set."); //NOI18N
+ throw new FacesException("Not all required fields are set."); //NOI18N
} else if (!this.userLoginController.ifCurrentPasswordMatches()) {
// Password not matching
this.showFacesMessage("form_login_change_personal:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()), FacesMessage.SEVERITY_ERROR); //NOI18N
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontacts.events.contact.add.ObservableAdminAddedContactEvent;
+import org.mxchange.jcontacts.events.contact.deleted.ObservableAdminDeletedContactEvent;
import org.mxchange.jcontacts.events.contact.update.ObservableAdminUpdatedContactEvent;
import org.mxchange.jcontacts.events.fax.unlinked.ObservableAdminUnlinkedFaxNumberEvent;
import org.mxchange.jcontacts.events.landline.unlinked.ObservableAdminUnlinkedLandLineNumberEvent;
this.uniqueAddContact(event.getAddedContact());
}
+ /**
+ * Event observer for when an administrator has deleted a contact
+ * <p>
+ * @param event Event being fired
+ */
+ public void afterAdminDeletedContactEvent (@Observes final ObservableAdminDeletedContactEvent event) {
+ // Validate parameter
+ if (null == event) {
+ // Throw NPE
+ throw new NullPointerException("event is null"); //NOI18N
+ } else if (event.getDeletedContact() == null) {
+ // Throw NPE again
+ throw new NullPointerException("event.deletedContact is null"); //NOI18N
+ } else if (event.getDeletedContact().getContactId() == null) {
+ // Throw NPE again
+ throw new NullPointerException("event.deletedContact.contactId is null"); //NOI18N
+ } else if (event.getDeletedContact().getContactId() < 1) {
+ // Throw IAE
+ throw new IllegalArgumentException(MessageFormat.format("event.deletedContact.contactId={0} is not valid.", event.getDeletedContact().getContactId())); //NOI18N
+ }
+
+ // Delete from cache and list
+ this.contactCache.remove(event.getDeletedContact().getContactId());
+ this.getAllContacts().remove(event.getDeletedContact());
+ }
+
/**
* Event observer for unlinked fax contact by administrators
* <p>
throw new NullPointerException("contactId is null"); //NOI18N
} else if (contactId < 1) {
// Throw IAE
- throw new IllegalArgumentException("contactId=" + contactId + " is invalid"); //NOI18N
+ throw new IllegalArgumentException(MessageFormat.format("contactId={0} is invalid", contactId)); //NOI18N
} else if (!this.contactCache.containsKey(contactId)) {
// Not found
throw new ContactNotFoundException(contactId);
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
+import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontacts.model.contact.Contact;
throw new IllegalStateException("User is not logged-in"); //NOI18N
} else if (!this.contactController.isRequiredChangePersonalDataSet()) {
// Not all required fields are set
- throw new FaceletException("Not all required fields are set."); //NOI18N
+ throw new FacesException("Not all required fields are set."); //NOI18N
} else if (!this.userLoginController.ifCurrentPasswordMatches()) {
// Password not matching
- throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
+ throw new FacesException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
} else if (!this.featureController.isFeatureEnabled("change_user_personal_data")) { //NOI18N
// Editing is not allowed
throw new IllegalStateException("User tried to edit personal data."); //NOI18N
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
+import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcountry.events.added.AdminAddedCountryEvent;
// Does it already exist?
if (this.isCountryAdded(country)) {
// Yes, then abort here
- throw new FaceletException(new CountryAlreadyAddedException(country));
+ throw new FacesException(new CountryAlreadyAddedException(country));
}
// Init variable
updatedCountry = this.adminCountryBean.addCountry(country);
} catch (final CountryAlreadyAddedException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
+import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
-import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcountry.model.data.Country;
updatedProvider = this.adminRemoteBean.addMobileProvider(mobileProvider);
} catch (final MobileProviderAlreadyAddedException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
import java.text.MessageFormat;
import javax.enterprise.context.RequestScoped;
-import javax.faces.view.facelets.FaceletException;
+import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jjobs.beans.BaseJobsBean;
user = this.userListController.lookupUserById(userId);
} catch (final UserNotFoundException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Is it null?
// @TODO Add password length check
if ((this.featureController.isFeatureEnabled("user_login_require_user_name")) && (this.userListController.isUserNameRegistered(newUser))) {
// User name is already used
- throw new FaceletException(new UserNameAlreadyRegisteredException(newUser));
+ throw new FacesException(new UserNameAlreadyRegisteredException(newUser));
} else if ((this.getContact() == null) && (this.contactController.isEmailAddressRegistered(newUser.getUserContact()))) {
// Email address is already used
this.showFacesMessage("admin_add_user:emailAddress", "ERROR_EMAIL_ADDRESS_ALREADY_USED", FacesMessage.SEVERITY_WARN); //NOI18N
}
} catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Clear helper
this.adminUserBean.deleteUser(this.getUser(), this.getUserDeleteReason());
} catch (final UserNotFoundException ex) {
// Should not happen, so throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
throw new FacesException(new UserStatusLockedException(this.getUser()));
} else if (this.getUser().getUserAccountStatus() == UserAccountStatus.UNCONFIRMED) {
// User account is locked
- throw new FaceletException(new UserStatusUnconfirmedException(this.getUser()));
+ throw new FacesException(new UserStatusUnconfirmedException(this.getUser()));
} else if (this.getUserLockReason() == null) {
// Throw NPE again
throw new NullPointerException("this.userLockReason is null"); //NOI18N
updatedUser = this.adminUserBean.lockUserAccount(this.getUser(), this.getUserLockReason(), baseUrl);
} catch (final UserStatusLockedException | UserStatusUnconfirmedException | UserNotFoundException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
throw new FacesException(new UserStatusConfirmedException(this.getUser()));
} else if (this.getUser().getUserAccountStatus() == UserAccountStatus.UNCONFIRMED) {
// User account is locked
- throw new FaceletException(new UserStatusUnconfirmedException(this.getUser()));
+ throw new FacesException(new UserStatusUnconfirmedException(this.getUser()));
}
// Init updated user instance
updatedUser = this.adminUserBean.unlockUserAccount(this.getUser(), baseUrl);
} catch (final UserStatusConfirmedException | UserStatusUnconfirmedException | UserNotFoundException ex) {
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Fire event
password = UserLoginUtils.createRandomPassword(JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH);
} else if (!this.isSamePasswordEntered()) {
// Both passwords don't match
- throw new FaceletException(new UserPasswordRepeatMismatchException());
+ throw new FacesException(new UserPasswordRepeatMismatchException());
} else {
// Both match, so get it from this bean
password = this.getUserPassword();
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
-import javax.faces.view.facelets.FaceletException;
+import javax.faces.FacesException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcoreee.events.helper.clear.HelperCleanupEvent;
throw new IllegalArgumentException(MessageFormat.format("userId is not valid: {0}", user.getUserId())); //NOI18N
} else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) {
// Account is already confirmed
- throw new FaceletException(new UserStatusConfirmedException(user));
+ throw new FacesException(new UserStatusConfirmedException(user));
} else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
// Account is already confirmed
- throw new FaceletException(new UserStatusLockedException(user));
+ throw new FacesException(new UserStatusLockedException(user));
} else if (user.getUserConfirmKey() == null) {
// Throw NPE
throw new NullPointerException("user.userConfirmKey is null"); //NOI18N
updatedUser = this.userBean.confirmAccount(user, baseUrl);
} catch (final UserStatusConfirmedException | UserStatusLockedException ex) {
// Something unexpected happened
- throw new FaceletException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N
+ throw new FacesException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N
}
// Fire event that the user has confirmed account
import java.util.Objects;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
+import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
-import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontacts.model.contact.Contact;
throw new IllegalStateException("User tried to change email address"); //NOI18N
} else if (!this.isRequiredChangeEmailAddressSet()) {
// Not all required fields are set
- throw new FaceletException("Not all required fields are set."); //NOI18N
+ throw new FacesException("Not all required fields are set."); //NOI18N
} else if (!Objects.equals(this.getEmailAddress(), this.getEmailAddressRepeat())) {
// Email address 1+2 mismatch
this.showFacesMessage("form_user_change_email_address:emailAddressRepeat", "ERROR_USER_EMAIL_ADDRESSES_MISMATCH", FacesMessage.SEVERITY_WARN); //NOI18N
import javax.enterprise.context.RequestScoped;
import javax.enterprise.event.Event;
import javax.enterprise.inject.Any;
+import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
-import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcoreee.utils.FacesUtils;
throw new IllegalStateException("User is not logged-in"); //NOI18N
} else if (!this.isRequiredChangePasswordSet()) {
// Not all required fields are set
- throw new FaceletException("Not all required fields are set."); //NOI18N
+ throw new FacesException("Not all required fields are set."); //NOI18N
} else if (!this.userLoginController.ifCurrentPasswordMatches()) {
// Password not matching
- throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
+ throw new FacesException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
} else if (!this.featureController.isFeatureEnabled("change_user_password")) { //NOI18N
// Editing is not allowed
throw new IllegalStateException("User tried to change password."); //NOI18N
this.clear();
// Throw again
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
// Clear bean
import javax.enterprise.event.Event;
import javax.enterprise.event.Observes;
import javax.enterprise.inject.Any;
+import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
-import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
import org.mxchange.jcontacts.model.contact.Contact;
// Is registration enabled?
if (!this.featureController.isFeatureEnabled("user_registration")) { //NOI18N
// Is not enabled
- throw new FaceletException("Registration is disabled."); //NOI18N
+ throw new FacesException("Registration is disabled."); //NOI18N
}
// Get user instance
throw new NullPointerException("user is null after createUserInstance() was called"); //NOI18N
} else if (!this.isRequiredPersonalDataSet()) {
// Not all required fields are set
- throw new FaceletException("Not all required fields are set."); //NOI18N
+ throw new FacesException("Not all required fields are set."); //NOI18N
} else if ((this.featureController.isFeatureEnabled("user_login_require_user_name")) && (this.userListController.isUserNameRegistered(user))) { //NOI18N
// Is multi-page enabled?
if (this.featureController.isFeatureEnabled("user_register_multiple_page")) { //NOI18N
// User name is already used, should not happen here
- throw new FaceletException(new UserNameAlreadyRegisteredException(user));
+ throw new FacesException(new UserNameAlreadyRegisteredException(user));
} else {
// May happen here, clear user name
this.clearUserName();
// Is multi-page enabled?
if (this.featureController.isFeatureEnabled("user_register_multiple_page")) { //NOI18N
// Email address has already been taken, should not happen here
- throw new FaceletException(new EmailAddressAlreadyRegisteredException(user));
+ throw new FacesException(new EmailAddressAlreadyRegisteredException(user));
} else {
// May happen here, reset fields
this.contactController.clearEmailAddresses();
// Is multi-page enabled?
if (this.featureController.isFeatureEnabled("user_register_multiple_page")) { //NOI18N
// Not same email address entered, should not happen here
- throw new FaceletException(new DataRepeatMismatchException("Email addresses not matching.")); //NOI18N
+ throw new FacesException(new DataRepeatMismatchException("Email addresses not matching.")); //NOI18N
} else {
// May happen here, reset fields
this.contactController.clearEmailAddresses();
// Is multi-page enabled?
if (this.featureController.isFeatureEnabled("user_register_multiple_page")) { //NOI18N
// Not same password entered, should no longer happen here
- throw new FaceletException(new DataRepeatMismatchException("Passwords not matching.")); //NOI18N
+ throw new FacesException(new DataRepeatMismatchException("Passwords not matching.")); //NOI18N
} else if (this.ifBothPasswordsEmptyAllowed()) {
// Both passwords are left empty and is allowed, then generate a random password
randomPassword = UserLoginUtils.createRandomPassword(JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH);
return "user_register_done"; //NOI18N
} catch (final UserNameAlreadyRegisteredException | EmailAddressAlreadyRegisteredException ex) {
// Continue to throw
- throw new FaceletException(ex);
+ throw new FacesException(ex);
}
}
// Is registration enabled?
if (!this.featureController.isFeatureEnabled("user_registration")) { //NOI18N
// Is not enabled
- throw new FaceletException("Registration is disabled."); //NOI18N
+ throw new FacesException("Registration is disabled."); //NOI18N
}
// Get user instance
ADMIN_CONTACT_DETAILS_HEADER=Kontaktdaten zu {0} {1} {2}:
ADMIN_DEPARTMENT_DETAILS_HEADER=Daten der Abteilung {0} (Id {1}):
ADMIN_HEADQUARTER_DETAILS_HEADER=Haupstelle von {0} (Id {1})):
+ERROR_PARAMETER_CONFIRM_KEY_IS_NOT_SET=Fehler: Parameter "confirmationKey" ist nicht gesetzt.
ADMIN_DEPARTMENT_DETAILS_HEADER=Data of department {0} (Id {1}):
ADMIN_HEADQUARTER_DETAILS_HEADER=Headquarter of {0} (Id {1})):
CHANGE=Change?
+ERROR_PARAMETER_CONFIRM_KEY_IS_NOT_SET=Error: Parameter "confirmKey" is required.
<type>java.lang.Boolean</type>
</attribute>
</tag>
- <tag>
- <tag-name>outputContactAdminDropdownMenu</tag-name>
- <description>This tag renders an administrative drop-down menu for given contact instance.</description>
- <source>resources/tags/admin/dropdown/contact/admin_contact_links.tpl</source>
- <attribute>
- <name>contact</name>
- <description>The contact instance that provides the data for this tag.</description>
- <required>true</required>
- <type>org.mxchange.jcontacts.model.contact.Contact</type>
- </attribute>
- <attribute>
- <name>renderShowLink</name>
- <description>Whether to render (default: true) "show contact" link.</description>
- <required>false</required>
- <type>java.langBoolean</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>outputUserAdminDropdownMenu</tag-name>
<description>This tag renders an administrative drop-down menu for given user instance.</description>
+++ /dev/null
-<?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_contact" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" rendered="#{empty renderShowLink or renderShowLink}">
- <f:param name="contactId" value="#{contact.contactId}" />
- </p:menuitem>
-
- <p:menuitem outcome="admin_edit_contact" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_USER_TITLE}">
- <f:param name="contactId" value="#{contact.contactId}" />
- </p:menuitem>
-
- <p:menuitem outcome="admin_delete_contact">
- <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_CONTACT_TITLE}" />
- <f:param name="contactId" value="#{contact.contactId}" />
- </p:menuitem>
- </p:menuButton>
-</ui:composition>
<h:panelGroup styleClass="table-data-field" layout="block">
<p:menuButton value="#{msg.OPTIONS}" rendered="#{empty rendered or rendered}">
- <p:menuitem outcome="admin_show_fax" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}" rendered="#{empty renderShowLink or renderShowLink}">
- <f:param name="phoneId" value="#{faxNumber.phoneId}" />
+ <p:menuitem
+ outcome="admin_show_fax"
+ value="#{msg.ADMIN_LINK_SHOW_SHORT}"
+ title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}"
+ >
+ <f:param name="faxId" value="#{faxNumber.phoneId}" />
</p:menuitem>
- <p:menuitem outcome="admin_edit_fax" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_FAX_NUMBER_TITLE}">
- <f:param name="phoneId" value="#{faxNumber.phoneId}" />
+ <p:menuitem
+ outcome="admin_edit_fax"
+ value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+ title="#{msg.ADMIN_LINK_EDIT_FAX_NUMBER_TITLE}"
+ >
+ <f:param name="faxId" value="#{faxNumber.phoneId}" />
</p:menuitem>
- <p:menuitem outcome="admin_unlink_contact_fax" rendered="#{not empty contact}">
- <h:outputText styleClass="link-warning" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_FAX_NUMBER_CONTACT_TITLE}" />
- <f:param name="phoneId" value="#{faxNumber.phoneId}" />
+ <p:menuitem
+ outcome="admin_unlink_contact_fax"
+ rendered="#{not empty contact}"
+ >
+ <h:outputText
+ styleClass="link-warning"
+ value="#{msg.ADMIN_LINK_UNLINK_SHORT}"
+ title="#{msg.ADMIN_LINK_UNLINK_FAX_NUMBER_CONTACT_TITLE}"
+ />
+ <f:param name="faxId" value="#{faxNumber.phoneId}" />
<f:param name="contactId" value="#{contact.contactId}" />
</p:menuitem>
- <p:menuitem outcome="admin_delete_fax">
- <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_FAX_NUMBER_TITLE}" />
- <f:param name="phoneId" value="#{faxNumber.phoneId}" />
+ <p:menuitem
+ outcome="admin_delete_fax"
+ >
+ <h:outputText
+ styleClass="link-danger"
+ value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+ title="#{msg.ADMIN_LINK_DELETE_FAX_NUMBER_TITLE}"
+ />
+ <f:param name="faxId" value="#{faxNumber.phoneId}" />
</p:menuitem>
</p:menuButton>
</h:panelGroup>
<p:outputLabel styleClass="table-data-label" value="#{msg.ADMIN_SHOW_ADMINISTRATIVE_LINKS}" />
<h:panelGroup styleClass="table-data-field" layout="block">
- <p:menuButton value="#{msg.OPTIONS}" rendered="#{empty rendered or rendered}">
- <p:menuitem outcome="admin_show_landline" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_LAND_LINE_NUMBER_TITLE}" rendered="#{empty renderShowLink or renderShowLink}">
- <f:param name="phoneId" value="#{landLineNumber.phoneId}" />
+ <p:menuButton
+ value="#{msg.OPTIONS}"
+ rendered="#{empty rendered or rendered}"
+ >
+ <p:menuitem
+ outcome="admin_show_landline"
+ value="#{msg.ADMIN_LINK_SHOW_SHORT}"
+ title="#{msg.ADMIN_LINK_SHOW_LAND_LINE_NUMBER_TITLE}"
+ >
+ <f:param name="landLineId" value="#{landLineNumber.phoneId}" />
</p:menuitem>
- <p:menuitem outcome="admin_edit_landline" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_LAND_LINE_NUMBER_TITLE}">
- <f:param name="phoneId" value="#{landLineNumber.phoneId}" />
+ <p:menuitem
+ outcome="admin_edit_landline"
+ value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+ title="#{msg.ADMIN_LINK_EDIT_LAND_LINE_NUMBER_TITLE}"
+ >
+ <f:param name="landLineId" value="#{landLineNumber.phoneId}" />
</p:menuitem>
- <p:menuitem outcome="admin_unlink_contact_landline" rendered="#{not empty contact}">
- <h:outputText styleClass="link-warning" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_LAND_LINE_NUMBER_CONTACT_TITLE}" />
- <f:param name="phoneId" value="#{landLineNumber.phoneId}" />
+ <p:menuitem
+ outcome="admin_unlink_contact_landline"
+ rendered="#{not empty contact}"
+ >
+ <h:outputText
+ styleClass="link-warning"
+ value="#{msg.ADMIN_LINK_UNLINK_SHORT}"
+ title="#{msg.ADMIN_LINK_UNLINK_LAND_LINE_NUMBER_CONTACT_TITLE}"
+ />
+ <f:param name="landLineId" value="#{landLineNumber.phoneId}" />
<f:param name="contactId" value="#{contact.contactId}" />
</p:menuitem>
- <p:menuitem outcome="admin_delete_landline">
- <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_LAND_LINE_NUMBER_TITLE}" />
- <f:param name="phoneId" value="#{landLineNumber.phoneId}" />
+ <p:menuitem
+ outcome="admin_delete_landline"
+ >
+ <h:outputText
+ styleClass="link-danger"
+ value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+ title="#{msg.ADMIN_LINK_DELETE_LAND_LINE_NUMBER_TITLE}"
+ />
+ <f:param name="landLineId" value="#{landLineNumber.phoneId}" />
</p:menuitem>
</p:menuButton>
</h:panelGroup>
<h:panelGroup styleClass="table-data-field" layout="block">
<p:menuButton value="#{msg.OPTIONS}" rendered="#{empty rendered or rendered}">
<p:menuitem outcome="admin_show_mobile" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_MOBILE_NUMBER_TITLE}" rendered="#{empty renderShowLink or renderShowLink}">
- <f:param name="phoneId" value="#{mobileNumber.mobileId}" />
+ <f:param name="mobileId" value="#{mobileNumber.mobileId}" />
</p:menuitem>
<p:menuitem outcome="admin_edit_mobile" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_MOBILE_NUMBER_TITLE}">
- <f:param name="phoneId" value="#{mobileNumber.mobileId}" />
+ <f:param name="mobileId" value="#{mobileNumber.mobileId}" />
</p:menuitem>
<p:menuitem outcome="admin_unlink_contact_mobile" rendered="#{not empty contact}">
<h:outputText styleClass="link-warning" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_MOBILE_NUMBER_CONTACT_TITLE}" />
- <f:param name="phoneId" value="#{mobileNumber.mobileId}" />
+ <f:param name="mobileId" value="#{mobileNumber.mobileId}" />
<f:param name="contactId" value="#{contact.contactId}" />
</p:menuitem>
<p:menuitem outcome="admin_delete_mobile">
<h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_MOBILE_NUMBER_TITLE}" />
- <f:param name="phoneId" value="#{mobileNumber.mobileId}" />
+ <f:param name="mobileId" value="#{mobileNumber.mobileId}" />
</p:menuitem>
</p:menuButton>
</h:panelGroup>
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:links="http://mxchange.org/jsf/core/links"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:core="http://mxchange.org/jsf/core/widgets"
- xmlns:links="http://mxchange.org/jsf/core/links"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
title="#{msg.ADMIN_LINK_SHOW_LAND_LINE_NUMBER_TITLE}"
rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}"
>
- <f:param name="phoneId" value="#{branchOfficeListController.selectedBranchOffice.branchLandLineNumber.phoneId}" />
+ <f:param name="landLineId" value="#{branchOfficeListController.selectedBranchOffice.branchLandLineNumber.phoneId}" />
</p:link>
<h:outputText value="#{msg.NO_LANDLINE_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}" />
title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}"
rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}"
>
- <f:param name="phoneId" value="#{branchOfficeListController.selectedBranchOffice.branchFaxNumber.phoneId}" />
+ <f:param name="faxId" value="#{branchOfficeListController.selectedBranchOffice.branchFaxNumber.phoneId}" />
</p:link>
<h:outputText value="#{msg.NO_FAX_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}" />
</p:panelGrid>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
- <f:viewAction action="#{beanHelper.notifyControllerContactConverted()}" />
+ <f:viewParam
+ name="contactId"
+ value="#{adminContactController.contact}"
+ converter="ContactConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}"
+ />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerDeleteContact" message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
-
<h:form rendered="#{not empty beanHelper.contact}">
<h:inputHidden value="#{adminContactController.contactId}" />
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
+ <f:viewParam
+ name="contactId"
+ value="#{beanHelper.contact}"
+ converter="ContactConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerContactConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerEditContact" message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
-
<h:form rendered="#{not empty beanHelper.contact}">
<h:inputHidden value="#{adminContactController.contactId}" />
sortable="false"
filterable="false"
>
- <links:outputContactAdminDropdownMenu contact="#{contact}" />
+ <p:menuButton value="#{msg.OPTIONS}">
+ <p:menuitem outcome="admin_show_contact" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" rendered="#{empty renderShowLink or renderShowLink}">
+ <f:param name="contactId" value="#{contact.contactId}" />
+ </p:menuitem>
+
+ <p:menuitem outcome="admin_edit_contact" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_USER_TITLE}">
+ <f:param name="contactId" value="#{contact.contactId}" />
+ </p:menuitem>
+
+ <p:menuitem outcome="admin_delete_contact">
+ <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_CONTACT_TITLE}" />
+ <f:param name="contactId" value="#{contact.contactId}" />
+ </p:menuitem>
+ </p:menuButton>
</p:column>
</p:dataTable>
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:core="http://mxchange.org/jsf/core/widgets"
- xmlns:links="http://mxchange.org/jsf/core/links"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
+ xmlns:p="http://primefaces.org/ui"
>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
+ <f:viewParam
+ name="contactId"
+ value="#{beanHelper.contact}"
+ converter="ContactConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerContactConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerShowContact" message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
+ <core:outputMessageBox
+ panelGroupId="errorHandlerShowContact"
+ message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}"
+ messageStyleClass="alert-danger"
+ rendered="#{empty beanHelper.contact}"
+ />
<ui:fragment rendered="#{not empty beanHelper.contact}">
<h:panelGroup styleClass="para" layout="block">
</h:panelGroup>
<h:panelGroup styleClass="para" layout="block">
- <links:outputContactAdminDropdownMenu contact="#{beanHelper.contact}" renderShowLink="false" />
+ <p:menuButton value="#{msg.OPTIONS}">
+ <p:menuitem
+ outcome="admin_edit_contact"
+ value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+ title="#{msg.ADMIN_LINK_EDIT_USER_TITLE}"
+ >
+ <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
+ </p:menuitem>
+
+ <p:menuitem outcome="admin_delete_contact">
+ <h:outputText
+ styleClass="link-danger"
+ value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+ title="#{msg.ADMIN_LINK_DELETE_CONTACT_TITLE}"
+ />
+ <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
+ </p:menuitem>
+ </p:menuButton>
</h:panelGroup>
<h:panelGroup styleClass="para" layout="block">
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
- <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
+ <f:viewParam
+ name="faxId"
+ value="#{beanHelper.faxNumber}"
+ converter="FaxNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
+ <f:viewParam
+ name="contactId"
+ value="#{beanHelper.contact}"
+ converter="ContactConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerContactConverted()}" />
<f:viewAction action="#{beanHelper.notifyControllerFaxNumberConverted()}" />
</f:metadata>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerUnlinkFaxNumber" message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.faxNumber}" />
-
- <core:outputMessageBox panelGroupId="errorHandlerUnlinkContact" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
-
<h:form rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactFaxNumber == beanHelper.faxNumber}">
<h:inputHidden value="#{adminContactPhoneController.contact}" />
<h:inputHidden value="#{adminContactPhoneController.phoneId}" />
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
- <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
+ <f:viewParam
+ name="landLineId"
+ value="#{beanHelper.landLineNumber}"
+ converter="LandLineNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
+ <f:viewParam
+ name="contactId"
+ value="#{beanHelper.contact}"
+ converter="ContactConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}"
+ />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerUnlinkLandline" message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.landLineNumber}" />
-
- <core:outputMessageBox panelGroupId="errorHandlerUnlinkContact" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
-
<h:form rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber == beanHelper.landLineNumber}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
- <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
+ <f:viewParam
+ name="mobileId"
+ value="#{beanHelper.mobileNumber}"
+ converter="MobileNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
+ <f:viewParam
+ name="contactId"
+ value="#{beanHelper.contact}"
+ converter="ContactConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}"
+ />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerUnlinkMobile" message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.mobileNumber}" />
-
- <core:outputMessageBox panelGroupId="errorHandlerUnlinkContact" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
-
<h:form rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber == beanHelper.mobileNumber}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:links="http://mxchange.org/jsf/core/links"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:links="http://mxchange.org/jsf/core/links"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:links="http://mxchange.org/jsf/core/links"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
+ <f:viewParam
+ name="faxId"
+ value="#{beanHelper.faxNumber}"
+ converter="FaxNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerFaxNumberConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerDeleteFax" message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.faxNumber}" />
-
<h:form rendered="#{not empty beanHelper.faxNumber}">
<h:inputHidden value="#{adminPhoneController.phoneId}" />
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
+ <f:viewParam
+ name="faxId"
+ value="#{beanHelper.faxNumber}"
+ converter="FaxNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerFaxNumberConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerEditFax" message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.faxNumber}" />
-
<h:form rendered="#{not empty beanHelper.faxNumber}">
<h:inputHidden value="#{adminPhoneController.phoneId}" />
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:define name="content">
<p:dataTable
- id="table_list_fax"
+ id="faxList"
var="faxNumber"
value="#{phoneListController.allFaxNumbers}"
paginator="true"
value="#{faxNumber.phoneId}"
title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}"
>
- <f:param name="phoneId" value="#{faxNumber.phoneId}" />
+ <f:param name="faxId" value="#{faxNumber.phoneId}" />
</p:link>
</p:column>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
+ <f:viewParam
+ name="faxId"
+ value="#{beanHelper.faxNumber}"
+ converter="FaxNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerFaxNumberConverted()}" />
</f:metadata>
</ui:define>
outcome="admin_unlink_contact_fax"
>
<h:outputText styleClass="link-warning" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_FAX_NUMBER_CONTACT_TITLE}" />
- <f:param name="phoneId" value="#{beanHelper.faxNumber.phoneId}" />
+ <f:param name="faxId" value="#{beanHelper.faxNumber.phoneId}" />
<f:param name="contactId" value="#{contact.contactId}" />
</p:link>
</li>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
+ <f:viewParam
+ name="landLineId"
+ value="#{beanHelper.landLineNumber}"
+ converter="LandLineNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerLandLineNumberConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerDeleteLandline" message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.landLineNumber}" />
-
<h:form rendered="#{not empty beanHelper.landLineNumber}">
<h:panelGroup styleClass="table" layout="block">
<div class="table-header">
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
+ <f:viewParam
+ name="landLineId"
+ value="#{beanHelper.landLineNumber}"
+ converter="LandLineNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerLandLineNumberConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerEditLandline" message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.landLineNumber}" />
-
<h:form rendered="#{not empty beanHelper.landLineNumber}">
<h:panelGroup layout="block">
<div class="table-header">
value="#{landLineNumber.phoneId}"
title="#{msg.ADMIN_LINK_SHOW_LAND_LINE_NUMBER_TITLE}"
>
- <f:param name="phoneId" value="#{landLineNumber.phoneId}" />
+ <f:param name="landLineId" value="#{landLineNumber.phoneId}" />
</p:link>
</p:column>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" />
+ <f:viewParam
+ name="landLineId"
+ value="#{beanHelper.landLineNumber}"
+ converter="LandLineNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerLandLineNumberConverted()}" />
</f:metadata>
</ui:define>
outcome="admin_unlink_contact_landline"
>
<h:outputText styleClass="link-warning" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_LAND_LINE_NUMBER_CONTACT_TITLE}" />
- <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" />
+ <f:param name="landLineId" value="#{beanHelper.landLineNumber.phoneId}" />
<f:param name="contactId" value="#{contact.contactId}" />
</p:link>
</li>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{adminPhoneController.mobileNumber}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
- <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
+ <f:viewParam
+ name="mobileId"
+ value="#{adminMobileController.mobileNumber}"
+ converter="CellphoneConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
+ <f:viewParam
+ name="contactId"
+ value="#{beanHelper.contact}"
+ converter="ContactConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}"
+ />
</f:metadata>
</ui:define>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
+ <f:viewParam
+ name="mobileId"
+ value="#{beanHelper.mobileNumber}"
+ converter="MobileNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerMobileNumberConverted()}" />
</f:metadata>
</ui:define>
<p:commandButton
type="submit"
value="#{msg.BUTTON_ADMIN_DELETE_MOBILE_NUMBER}"
- action="#{adminPhoneController.deleteMobileData()}"
+ action="#{adminMobileController.deleteMobileData()}"
/>
</h:panelGroup>
</h:form>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
+ <f:viewParam
+ name="mobileId"
+ value="#{beanHelper.mobileNumber}"
+ converter="MobileNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerMobileNumberConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerEditMobile" message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.mobileNumber}" />
-
<h:form rendered="#{not empty beanHelper.mobileNumber}">
<h:panelGroup layout="block">
<div class="table-header">
<p:commandButton
type="submit"
value="#{msg.BUTTON_ADMIN_EDIT_MOBILE_NUMBER}"
- action="#{adminPhoneController.doUpdateMobileNumber()}"
+ action="#{adminMobileController.doUpdateMobileNumber()}"
/>
</p:panelGrid>
</h:panelGroup>
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
+ <f:viewParam
+ name="mobileId"
+ value="#{beanHelper.mobileNumber}"
+ converter="MobileNumberConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerMobileNumberConverted()}" />
</f:metadata>
</ui:define>
outcome="admin_unlink_contact_mobile"
>
<h:outputText styleClass="link-warning" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_MOBILE_NUMBER_CONTACT_TITLE}" />
- <f:param name="phoneId" value="#{beanHelper.mobileNumber.mobileId}" />
+ <f:param name="mobileId" value="#{beanHelper.mobileNumber.mobileId}" />
<f:param name="contactId" value="#{contact.contactId}" />
</p:link>
</li>
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
+ <f:viewParam
+ name="userId"
+ value="#{beanHelper.user}"
+ converter="UserConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_USER_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerUserActivityLog" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
-
<p:dataTable
id="table_user_activity_log"
var="userActivity"
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
+ <f:viewParam
+ name="userId"
+ value="#{beanHelper.user}"
+ converter="UserConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_USER_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerDeleteUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
-
<h:form rendered="#{not empty beanHelper.user}">
<h:panelGroup layout="block">
<div class="table-header">
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
+ <f:viewParam
+ name="userId"
+ value="#{beanHelper.user}"
+ converter="UserConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_USER_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerEditUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
-
<h:form rendered="#{not empty beanHelper.user}">
<h:panelGroup layout="block">
<div class="table-header">
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
+ <f:viewParam
+ name="userId"
+ value="#{beanHelper.user}"
+ converter="UserConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_USER_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerLockUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
-
<h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}">
<h:panelGroup layout="block">
<div class="table-header">
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
+ <f:viewParam
+ name="userId"
+ value="#{beanHelper.user}"
+ converter="UserConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_USER_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerResendLinkUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
-
<h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
<h:panelGroup layout="block">
<div class="table-header">
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
xmlns:links="http://mxchange.org/jsf/core/links"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
+ <f:viewParam
+ name="userId"
+ value="#{beanHelper.user}"
+ converter="UserConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_USER_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerShowUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
-
<ui:fragment rendered="#{not empty beanHelper.user}">
<ui:include src="/WEB-INF/templates/admin/user/admin_show_user_data.tpl" />
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
+ <f:viewParam
+ name="userId"
+ value="#{beanHelper.user}"
+ converter="UserConverter"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}"
+ converterMessage="#{msg.PARAMETER_USER_ID_INVALID}"
+ />
<f:viewAction action="#{beanHelper.notifyControllerUserConverted()}" />
</f:metadata>
</ui:define>
</ui:define>
<ui:define name="content">
- <core:outputMessageBox panelGroupId="errorHandlerUnlockUser" message="#{msg.ERROR_USER_NOT_FOUND}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
-
<h:form rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}">
<h:panelGroup layout="block">
<div class="table-header">
<ui:define name="metadata">
<f:metadata>
- <f:viewParam name="confirmKey" value="#{userConfirmationLinkController.confirmationKey}" />
+ <f:viewParam
+ name="confirmKey"
+ value="#{userConfirmationLinkController.confirmationKey}"
+ required="true"
+ requiredMessage="#{msg.ERROR_PARAMETER_CONFIRM_KEY_IS_NOT_SET}"
+ />
<f:viewAction action="#{userConfirmationLinkController.maybeConfirmUserAccount()}" />
</f:metadata>
</ui:define>
<core:outputMessageBox panelGroupId="errorHandlerConfirmUser" message="#{msg.GUEST_CONFIRMATION_LINK_INVALID}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" />
</ui:fragment>
-
- <core:outputMessageBox panelGroupId="errorConfirmationKey" message="#{msg.GUEST_CONFIRMATION_KEY_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty userConfirmationLinkController.confirmationKey}" />
</ui:define>
</ui:composition>