this.getUser().setUserEncryptedPassword(encryptedPassword);
}
- // Call EJB for updating user data
- final User updatedUser = this.userBean.updateUserData(this.getUser());
+ // Init updated User instance
+ final User updatedUser;
+
+ try {
+ // Call EJB for updating user data
+ updatedUser = this.userBean.updateUserData(this.getUser());
+ } catch (final UserNotFoundException ex) {
+ // Throw as cause
+ throw new FacesException(ex);
+ }
// Fire event
this.updatedUserDataEvent.fire(new AdminPostUserDataUpdatedEvent(updatedUser));
import org.mxchange.jjobs.beans.user.list.JobsUserListWebViewController;
import org.mxchange.jusercore.events.user.created.CreatedUserEvent;
import org.mxchange.jusercore.events.user.created.ObservableCreatedUserEvent;
+import org.mxchange.jusercore.exceptions.UserNotFoundException;
import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
import org.mxchange.jusercore.exceptions.UserStatusLockedException;
import org.mxchange.jusercore.model.user.User;
// Confirm account
updatedUser = this.userBean.confirmAccount(user, baseUrl);
- } catch (final UserStatusConfirmedException | UserStatusLockedException ex) {
+ } catch (final UserStatusConfirmedException | UserStatusLockedException | UserNotFoundException ex) {
// Something unexpected happened
throw new FacesException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N
}
</ui:fragment>
<p:column>
- <p:outputLabel for="userCreated" styleClass="table-data-label" value="#{msg.ADMIN_USER_CREATED}" />
+ <p:outputLabel for="userEntryCreated" styleClass="table-data-label" value="#{msg.ADMIN_USER_CREATED}" />
- <h:outputText id="userCreated" styleClass="table-data-field" value="#{beanHelper.user.userCreated}">
+ <h:outputText id="userEntryCreated" styleClass="table-data-field" value="#{beanHelper.user.userEntryCreated}">
<f:convertDateTime type="both" />
</h:outputText>
</p:column>
<p:column>
- <p:outputLabel for="userUpdated" styleClass="table-data-label" value="#{msg.ADMIN_USER_UPDATED}" />
+ <p:outputLabel for="userEntryUpdated" styleClass="table-data-label" value="#{msg.ADMIN_USER_UPDATED}" />
- <h:outputText id="userUpdated" styleClass="table-data-field" value="#{beanHelper.user.userUpdated}">
+ <h:outputText id="userEntryUpdated" styleClass="table-data-field" value="#{beanHelper.user.userEntryUpdated}">
<f:convertDateTime type="both" />
</h:outputText>
</p:column>
</ui:fragment>
<p:column>
- <p:outputLabel for="userCreated" styleClass="table-data-label" value="#{msg.ADMIN_USER_CREATED}" />
+ <p:outputLabel for="userEntryCreated" styleClass="table-data-label" value="#{msg.ADMIN_USER_CREATED}" />
- <h:outputText id="userCreated" styleClass="table-data-field" value="#{beanHelper.user.userCreated}">
+ <h:outputText id="userEntryCreated" styleClass="table-data-field" value="#{beanHelper.user.userEntryCreated}">
<f:convertDateTime type="both" />
</h:outputText>
</p:column>
<h:outputText value="#{msg.ADMIN_LIST_USER_ACTIVITY_LOG_TIMESTAMP}" />
</f:facet>
- <h:outputText id="userCreated" value="#{userActivity.activityTimestamp}">
+ <h:outputText value="#{userActivity.activityTimestamp}">
<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
</p:column>
<p:column
headerText="#{msg.ENTRY_CREATED_HEADER}"
- sortBy="#{user.userCreated}"
+ sortBy="#{user.userEntryCreated}"
filterable="false"
>
- <h:outputText value="#{user.userCreated}">
+ <h:outputText value="#{user.userEntryCreated}">
<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
</p:column>
<p:column
headerText="#{msg.ENTRY_UPDATED_HEADER}"
- sortBy="#{user.userUpdated}"
+ sortBy="#{user.userEntryUpdated}"
filterable="false"
>
- <h:outputText value="#{user.userUpdated}">
+ <h:outputText value="#{user.userEntryUpdated}">
<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
</p:column>
<p:commandButton
type="submit"
- id="submit_add_user"
value="#{msg.BUTTON_ADMIN_ADD_USER}"
action="#{adminUserController.addUser()}"
update="form-list-users:userList"
<h:outputText value="#{msg.USER_CREATED}" />
</f:facet>
- <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
+ <h:outputFormat id="userEntryCreated" value="#{user.userEntryCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
</p:column>
</ui:fragment>
</p:dataTable>