From: Roland Haeder Date: Wed, 14 Oct 2015 13:31:23 +0000 (+0200) Subject: switch to proper template base X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7c1987d7717f0d076e02f5b773a11fd85b64ad61;p=addressbook-war.git switch to proper template base Signed-off-by:Roland Häder --- 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}