]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Wed, 20 May 2020 16:42:59 +0000 (18:42 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 20 May 2020 16:47:03 +0000 (18:47 +0200)
- renamed userCreated -> userEntryCreated
- renamed userUpdated -> userEntryUpdated
- updateUserData() may throw a checked UserNotFoundException, let's catch it
  here and throw a FacesException with it as cause
- same with confirmAccount()

Signed-off-by: Roland Häder <roland@mxchange.org>
lib/jbonuscard-core.jar [new file with mode: 0644]
src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/user/confirmlink/FinancialsConfirmationLinkWebRequestBean.java
web/WEB-INF/templates/admin/user/admin_show_user_data.tpl
web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl
web/admin/user/admin_user_activity_log.xhtml
web/admin/user/admin_user_list.xhtml
web/guest/user/user_list.xhtml

diff --git a/lib/jbonuscard-core.jar b/lib/jbonuscard-core.jar
new file mode 100644 (file)
index 0000000..2aa8f1a
Binary files /dev/null and b/lib/jbonuscard-core.jar differ
index f8cbb418c6927c53ea6657f9655bc09d75e34eb5..37af0ee810b17adfe5bcb9ee9f70050f3bc0b705 100644 (file)
@@ -431,8 +431,16 @@ public class FinancialsAdminUserWebRequestBean extends BaseFinancialsBean implem
                        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));
index ab615016417792ab98070c7bb16804c6653c37da..0025e5b09f1d47cdfb3289921fdc4f5764157ab3 100644 (file)
@@ -32,6 +32,7 @@ import org.mxchange.jfinancials.beans.BaseFinancialsBean;
 import org.mxchange.jfinancials.beans.user.list.FinancialsUserListWebViewController;
 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;
@@ -183,7 +184,7 @@ public class FinancialsConfirmationLinkWebRequestBean extends BaseFinancialsBean
 
                        // 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
                }
index 28f60d9e1a25b045e0967541888ba395762c19b3..e114c2d9dbe04f604374f2f2bdda3df4058943db 100644 (file)
                </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>
index 23db73bdd98c56372df2a0d777788c32382b1472..b6a0db4d9117e3a50bc6f9160dfde91428f77cf4 100644 (file)
@@ -46,9 +46,9 @@
                </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>
index 63b7cde7693258103b937012fec69e381aae8bd5..e0ec4c6dbd2e725c031a3c975e6428434e4f9948 100644 (file)
                                        <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>
index a3fed78d7734eb71024d3584f7571fed676acad2..425ae0d400819b8a470e7a09f4b173061a14a35d 100644 (file)
 
                                <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"
index e602e32e11e25f6b1003b9c53ccea545d2f75b72..43392523266554c3eebbd0fcb97ab4a9c344d8ff 100644 (file)
@@ -56,7 +56,7 @@
                                                        <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>