From 7c1987d7717f0d076e02f5b773a11fd85b64ad61 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 14 Oct 2015 15:31:23 +0200 Subject: [PATCH] =?utf8?q?switch=20to=20proper=20template=20base=20Signed-?= =?utf8?q?off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../beans/login/UserLoginWebBean.java | 19 +++++++++++++++++++ .../beans/login/UserLoginWebController.java | 14 ++++++++++++++ web/user/user_profile.xhtml | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java index a8ca0928..580b57c3 100644 --- a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java +++ b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebBean.java @@ -59,6 +59,12 @@ public class UserLoginWebBean implements UserLoginWebController { */ private UserLoginSessionBeanRemote loginBean; + /** + * Template type for pages that might be displayed in guest area and login + * area. Default is guest area. + */ + private String templateType = "guest"; + /** * User controller */ @@ -96,6 +102,9 @@ public class UserLoginWebBean implements UserLoginWebController { // All fine here so set it here this.setLoggedInUser(confirmedUser); + // Set template to "login" + this.setTemplateType("login"); //NOI18N + // All fine return "login"; //NOI18N } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException | UserPasswordMismatchException ex) { @@ -114,6 +123,16 @@ public class UserLoginWebBean implements UserLoginWebController { this.loggedInUser = loggedInUser; } + @Override + public String getTemplateType () { + return this.templateType; + } + + @Override + public void setTemplateType (final String templateType) { + this.templateType = templateType; + } + @Override public boolean isUserLoggedIn () { // Compare instance diff --git a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebController.java b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebController.java index ff8adf55..96e785c6 100644 --- a/src/java/org/mxchange/addressbook/beans/login/UserLoginWebController.java +++ b/src/java/org/mxchange/addressbook/beans/login/UserLoginWebController.java @@ -26,6 +26,20 @@ import org.mxchange.jusercore.model.user.User; */ public interface UserLoginWebController extends Serializable { + /** + * Getter for template type + *

+ * @return Template type + */ + public String getTemplateType (); + + /** + * Setter for template type + *

+ * @param templateType Template type + */ + public void setTemplateType (final String templateType); + /** * Logins the user, if the account is found, confirmed and unlocked. *

diff --git a/web/user/user_profile.xhtml b/web/user/user_profile.xhtml index 4866ab0f..33db5830 100644 --- a/web/user/user_profile.xhtml +++ b/web/user/user_profile.xhtml @@ -6,7 +6,7 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - + #{msg.PAGE_TITLE_INDEX_USER_PROFILE} -- 2.39.5