From 7b1749a660ad62a9c65348e665a8750d2fe5365f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 19 Apr 2016 17:55:11 +0200 Subject: [PATCH] Continued with refacturing: - added general admin helper for just holding objects - used that new helper for user instance to have auto-completition back - updated properties MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../RateCalcAdminWebRequestController.java | 43 ++ .../helper/RateCalcAdminWebRequestHelper.java | 58 +++ web/admin/user/admin_user_delete.xhtml | 4 +- web/admin/user/admin_user_edit.xhtml | 4 +- web/admin/user/admin_user_show.xhtml | 368 +++++++++--------- web/admin/user/admin_user_unlock.xhtml | 4 +- 6 files changed, 291 insertions(+), 190 deletions(-) create mode 100644 src/java/org/mxchange/jratecalc/beans/helper/RateCalcAdminWebRequestController.java create mode 100644 src/java/org/mxchange/jratecalc/beans/helper/RateCalcAdminWebRequestHelper.java diff --git a/src/java/org/mxchange/jratecalc/beans/helper/RateCalcAdminWebRequestController.java b/src/java/org/mxchange/jratecalc/beans/helper/RateCalcAdminWebRequestController.java new file mode 100644 index 00000000..0e3b01ae --- /dev/null +++ b/src/java/org/mxchange/jratecalc/beans/helper/RateCalcAdminWebRequestController.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2016 Cho-Time GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.jratecalc.beans.helper; + +import java.io.Serializable; +import org.mxchange.jusercore.model.user.User; + +/** + * An interface for general bean helper + *

+ * @author Roland Haeder + */ +public interface RateCalcAdminWebRequestController extends Serializable { + + /** + * Getter for user instance + *

+ * @return User instance + */ + User getUser (); + + /** + * Setter for user instance + *

+ * @param user User instance + */ + void setUser (final User user); + +} diff --git a/src/java/org/mxchange/jratecalc/beans/helper/RateCalcAdminWebRequestHelper.java b/src/java/org/mxchange/jratecalc/beans/helper/RateCalcAdminWebRequestHelper.java new file mode 100644 index 00000000..0f2f8e52 --- /dev/null +++ b/src/java/org/mxchange/jratecalc/beans/helper/RateCalcAdminWebRequestHelper.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2016 Cho-Time GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.jratecalc.beans.helper; + +import javax.enterprise.context.RequestScoped; +import javax.inject.Named; +import org.mxchange.jusercore.model.user.User; + +/** + * A general helper for beans + *

+ * @author Roland Haeder + */ +@Named ("adminHelper") +@RequestScoped +public class RateCalcAdminWebRequestHelper implements RateCalcAdminWebRequestController { + + /** + * Serial number + */ + private static final long serialVersionUID = 17_258_793_567_145_701L; + + /** + * User instance + */ + private User user; + + /** + * Default constructor + */ + public RateCalcAdminWebRequestHelper () { + } + + @Override + public User getUser () { + return this.user; + } + + @Override + public void setUser (final User user) { + this.user = user; + } + +} diff --git a/web/admin/user/admin_user_delete.xhtml b/web/admin/user/admin_user_delete.xhtml index 176979d0..0fdcb199 100644 --- a/web/admin/user/admin_user_delete.xhtml +++ b/web/admin/user/admin_user_delete.xhtml @@ -9,7 +9,7 @@ > - + @@ -20,7 +20,7 @@ - + Here goes your content. diff --git a/web/admin/user/admin_user_edit.xhtml b/web/admin/user/admin_user_edit.xhtml index 8c8523be..4d3c97fe 100644 --- a/web/admin/user/admin_user_edit.xhtml +++ b/web/admin/user/admin_user_edit.xhtml @@ -9,7 +9,7 @@ > - + @@ -20,7 +20,7 @@ - + Here goes your content. diff --git a/web/admin/user/admin_user_show.xhtml b/web/admin/user/admin_user_show.xhtml index 2e45ef73..f9caa671 100644 --- a/web/admin/user/admin_user_show.xhtml +++ b/web/admin/user/admin_user_show.xhtml @@ -1,184 +1,184 @@ - - - - - - - - - - #{msg.PAGE_TITLE_ADMIN_SHOW_USER} - - - #{msg.CONTENT_TITLE_ADMIN_SHOW_USER} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + #{msg.PAGE_TITLE_ADMIN_SHOW_USER} + + + #{msg.CONTENT_TITLE_ADMIN_SHOW_USER} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/admin/user/admin_user_unlock.xhtml b/web/admin/user/admin_user_unlock.xhtml index da2dd766..fe96f551 100644 --- a/web/admin/user/admin_user_unlock.xhtml +++ b/web/admin/user/admin_user_unlock.xhtml @@ -9,7 +9,7 @@ > - + @@ -20,7 +20,7 @@ - + Here goes your content. -- 2.39.5