From 1d451138ff6e126c87e1335655300b70145053ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 6 Aug 2016 09:55:12 +0200 Subject: [PATCH] Continued a bit: (please cherry-pick) - don't wrap command buttons in rendered="" conditions and not with ui:fragment (please name me a full replacement for all the other cases where I'm using it) - this makes it impossible for the button's action (controller method) being executed as this depends on the life-cycle of the JSF - it may work in viewing the JSF page but not when you submit it. - rewrote parameter 'user' to beanHelper.user as this was already being used - show proper lock/unlock link depending on user's account status - added navigation rule for new user lock JSF page MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- nbproject/faces-config.NavData | 133 +++++++++--------- .../localization/bundle_de_DE.properties | 1 + .../localization/bundle_en_US.properties | 1 + web/WEB-INF/faces-config.xml | 4 + .../templates/admin/user/admin_user_links.tpl | 18 ++- web/admin/user/admin_user_lock.xhtml | 10 +- web/admin/user/admin_user_show.xhtml | 4 +- web/admin/user/admin_user_unlock.xhtml | 10 +- 8 files changed, 93 insertions(+), 88 deletions(-) diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index ea458f2c..2c9cd953 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -2,73 +2,74 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 38a48a43..5dc86c49 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -630,3 +630,4 @@ BUTTON_ADMIN_UNLOCK_USER_ACCOUNT=Benutzeraccount entsperren ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED=Unbest\u00e4tigte Benutzeraccounts k\u00f6nnen nicht gesperrt werden. PAGE_TITLE_ADMIN_LOCK_USER=Benutzeraccount sperren CONTENT_TITLE_ADMIN_LOCK_USER=Benutzeraccount sperren: +ERROR_BEAN_HELPER_USER_NOT_SET=Fehler: Instanz 'user' im Bean-Helper nicht gesetzt. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 6d95931b..cd9dee42 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -627,3 +627,4 @@ BUTTON_ADMIN_UNLOCK_USER_ACCOUNT=Unlock user account ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED=Unconfirmed user accounts cannot be locked. PAGE_TITLE_ADMIN_LOCK_USER=Lock user account CONTENT_TITLE_ADMIN_LOCK_USER=Lock user account: +ERROR_BEAN_HELPER_USER_NOT_SET=Error: Instance 'user' not set in bean helper. diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 6d3fcbd0..5f435f73 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -275,6 +275,10 @@ admin_delete_user /admin/user/admin_user_delete.xhtml + + admin_lock_user + /admin/user/admin_user_lock.xhtml + admin_unlock_user /admin/user/admin_user_unlock.xhtml diff --git a/web/WEB-INF/templates/admin/user/admin_user_links.tpl b/web/WEB-INF/templates/admin/user/admin_user_links.tpl index 0c66c586..ef30a769 100644 --- a/web/WEB-INF/templates/admin/user/admin_user_links.tpl +++ b/web/WEB-INF/templates/admin/user/admin_user_links.tpl @@ -5,9 +5,9 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - + - +
@@ -17,26 +17,30 @@
  • - +
  • - +
  • - - + + + + + +
  • - +
diff --git a/web/admin/user/admin_user_lock.xhtml b/web/admin/user/admin_user_lock.xhtml index f08c7d82..e074bcb7 100644 --- a/web/admin/user/admin_user_lock.xhtml +++ b/web/admin/user/admin_user_lock.xhtml @@ -23,7 +23,7 @@ - +
@@ -77,14 +77,12 @@
+ + diff --git a/web/admin/user/admin_user_show.xhtml b/web/admin/user/admin_user_show.xhtml index 17df6277..f9c9b9cd 100644 --- a/web/admin/user/admin_user_show.xhtml +++ b/web/admin/user/admin_user_show.xhtml @@ -180,9 +180,7 @@
- - - +
diff --git a/web/admin/user/admin_user_unlock.xhtml b/web/admin/user/admin_user_unlock.xhtml index 8c9e71f0..fe8dc182 100644 --- a/web/admin/user/admin_user_unlock.xhtml +++ b/web/admin/user/admin_user_unlock.xhtml @@ -22,7 +22,7 @@ - +
@@ -76,14 +76,12 @@
+ + -- 2.39.5