*/
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
*/
// 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) {
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
*/
public interface UserLoginWebController extends Serializable {
+ /**
+ * Getter for template type
+ * <p>
+ * @return Template type
+ */
+ public String getTemplateType ();
+
+ /**
+ * Setter for template type
+ * <p>
+ * @param templateType Template type
+ */
+ public void setTemplateType (final String templateType);
+
/**
* Logins the user, if the account is found, confirmed and unlocked.
* <p>
xmlns:f="http://xmlns.jcp.org/jsf/core"
>
- <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+ <ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
<ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_USER_PROFILE}</ui:define>
<ui:define name="content_header">