@Override
public String getCurrentPassword () {
- return currentPassword;
+ return this.currentPassword;
}
@Override
private static final long serialVersionUID = 187_687_145_286_710L;
/**
- * User controller
+ * Administrative user controller
*/
@Inject
private PizzaAdminUserWebRequestController adminUserController;
* Login controller
*/
@Inject
- private PizzaUserLoginWebSessionController loginController;
+ private PizzaUserLoginWebSessionController userLoginController;
@Override
public boolean isProfileLinkVisibleById (final Long userId) {
return ((profileMode.equals(ProfileMode.PUBLIC)) ||
(this.userLoginController.isUserLoggedIn()) && (profileMode.equals(ProfileMode.MEMBERS)));
}
+
}
*/
private static final long serialVersionUID = 47_828_986_719_691_592L;
+ /**
+ * User controller
+ */
+ @Inject
+ private PizzaAdminUserWebRequestController adminUserController;
+
/**
* User controller
*/
@Inject
private PizzaUserWebSessionController userController;
- /**
- * User controller
- */
- @Inject
- private PizzaAdminUserWebRequestController adminUserController;
-
/**
* Default constructor
*/
@Inject
private PizzaContactWebSessionController contactController;
- /**
- * Login bean (controller)
- */
- @Inject
- private PizzaUserLoginWebSessionController loginController;
-
/**
* A list of all selectable contacts
*/
*/
private List<User> userList;
+ /**
+ * Login bean (controller)
+ */
+ @Inject
+ private PizzaUserLoginWebSessionController userLoginController;
+
/**
* User name
*/
// Debug message
//* NOISY-DEBUG: */ System.out.println(MessageFormat.format("AdminUserWebBean:afterRegistration: registeredUser={0}", registeredUser)); //NOI18N
-
// Add user to local list
this.userList.add(registeredUser);
// Add user name and email address
this.addUserNameEmailAddress(registeredUser);
+ // Clear all data
+ this.clear();
+
// Trace message
//* NOISY-DEBUG: */ System.out.println("AdminUserWebBean:afterRegistration: EXIT!"); //NOI18N
}
this.userNameList = this.userBean.getUserNameList();
// Is the user logged-in?
- if (this.loginController.isUserLoggedIn()) {
+ if (this.userLoginController.isUserLoggedIn()) {
// Is logged-in, so load also users visible to memebers
this.visibleUserList = this.userBean.allMemberPublicVisibleUsers();
} else {
// Initialize user list
this.visibleUserList = this.userBean.allPublicUsers();
}
+
// Initialize user list
this.userList = this.userBean.allUsers();
+ // Get full user name list for reducing EJB calls
+ this.userNameList = this.userBean.getUserNameList();
+
+ // Is the user logged-in?
+ if (this.userLoginController.isUserLoggedIn()) {
+ // Is logged-in, so load also users visible to memebers
+ this.visibleUserList = this.userBean.allMemberPublicVisibleUsers();
+ } else {
+ // Initialize user list
+ this.visibleUserList = this.userBean.allPublicUsers();
+ }
+
// Get all contacts
- List<Contact> allContacts = this.contactBean.getAllContacts();
+ List<Contact> allContacts = this.contactController.allContacts();
// Get iterator
Iterator<Contact> iterator = allContacts.iterator();
* Clears this bean
*/
private void clear () {
- // Clear all fields
+ // Clear all data
+ // - other data
this.setUserName(null);
this.setUserPassword(null);
this.setUserPasswordRepeat(null);
*/
boolean isContactFound (final Contact contact);
+ /**
+ * Checks whether a public user account is registered. This means that at
+ * least one user profile has its flag "public user profile" enabled.
+ * <p>
+ * @return Whether at least one user has a public profile
+ */
+ boolean isVisibleUserFound ();
+
/**
* Checks whether given user instance's name is used
* <p>
*/
boolean isUserNameRegistered (final User user);
- /**
- * Checks whether a public user account is registered. This means that at
- * least one user profile has its flag "public user profile" enabled.
- * <p>
- * @return Whether at least one user has a public profile
- */
- boolean isVisibleUserFound ();
-
/**
* Tries to lookup user by given id number. If the user is not found or the
* account status is not CONFIRMED proper exceptions are thrown.
// Debug message
//* NOISY-DEBUG: */ System.out.println(MessageFormat.format("UserWebBean:afterRegistration: registeredUser={0}", registeredUser)); //NOI18N
-
// Copy all data from registered->user
this.copyUser(registeredUser);
<f:metadata>
<f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+ <f:viewAction action="#{adminHelper.copyUserToController()}" />
</f:metadata>
<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
<div class="table_right_medium">
<h:selectOneMenu class="select" id="userContact" value="#{adminHelper.contact}" converter="ContactConverter">
<f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
- <f:selectItems value="#{userController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
+ <f:selectItems value="#{adminUserController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
</h:selectOneMenu>
</div>
<f:metadata>
<f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+ <f:viewAction action="#{adminHelper.copyUserToController()}" />
</f:metadata>
<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
<f:metadata>
<f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+ <f:viewAction action="#{adminHelper.copyUserToController()}" />
</f:metadata>
<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">