]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Continued with refacturing:
authorRoland Häder <roland@mxchange.org>
Tue, 19 Apr 2016 15:55:11 +0000 (17:55 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 19 Apr 2016 18:05:46 +0000 (20:05 +0200)
- added general admin helper for just holding objects
- used that new helper for user instance to have auto-completition back
- updated properties

Signed-off-by: Roland Häder <roland@mxchange.org>
15 files changed:
lib/jaddressbook-core.jar [new file with mode: 0644]
nbproject/build-impl.xml
nbproject/genfiles.properties
nbproject/project.properties
nbproject/project.xml
src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java
src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionController.java
src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java
src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionController.java
web/admin/user/admin_user_delete.xhtml
web/admin/user/admin_user_edit.xhtml
web/admin/user/admin_user_show.xhtml
web/admin/user/admin_user_unlock.xhtml

diff --git a/lib/jaddressbook-core.jar b/lib/jaddressbook-core.jar
new file mode 100644 (file)
index 0000000..246241d
Binary files /dev/null and b/lib/jaddressbook-core.jar differ
index 2344271afed85d649a91a7d8cc29f609480e0cbf..73fed031594dd715e5a9987e81cace9fca320656 100644 (file)
@@ -881,6 +881,9 @@ exists or setup the property manually. For example like this:
         <ant antfile="${project.addressbook-lib}/build.xml" inheritall="false" target="jar">
             <property name="deploy.on.save" value="false"/>
         </ant>
+        <ant antfile="${project.addressbook-lib-1}/build.xml" inheritall="false" target="jar">
+            <property name="deploy.on.save" value="false"/>
+        </ant>
         <ant antfile="${project.addressbook-mailer}/build.xml" inheritall="false" target="jar">
             <property name="deploy.on.save" value="false"/>
         </ant>
@@ -889,6 +892,9 @@ exists or setup the property manually. For example like this:
         <ant antfile="${project.addressbook-lib}/build.xml" inheritall="false" target="jar">
             <property name="deploy.on.save" value="false"/>
         </ant>
+        <ant antfile="${project.addressbook-lib-1}/build.xml" inheritall="false" target="jar">
+            <property name="deploy.on.save" value="false"/>
+        </ant>
         <ant antfile="${project.addressbook-mailer}/build.xml" inheritall="false" target="jar">
             <property name="deploy.on.save" value="false"/>
         </ant>
@@ -1042,16 +1048,13 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.jcountry-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcountry-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcontacts-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${file.reference.jcontacts-business-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcontacts-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jphone-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jphone-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.juser-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.juser-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${reference.addressbook-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.jaddressbook-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${reference.addressbook-mailer.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${file.reference.cdi-api.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${file.reference.gf-client.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <mkdir dir="${build.web.dir}/META-INF"/>
         <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
     </target>
@@ -1062,16 +1065,13 @@ exists or setup the property manually. For example like this:
         <copyfiles files="${file.reference.jcountry-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcountry-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcontacts-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${file.reference.jcontacts-business-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcontacts-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jphone-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jphone-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.juser-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.juser-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${reference.addressbook-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${file.reference.jaddressbook-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${reference.addressbook-mailer.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${file.reference.cdi-api.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${file.reference.gf-client.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
     </target>
     <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
         <delete dir="${build.web.dir}/WEB-INF/lib"/>
@@ -1486,6 +1486,7 @@ exists or setup the property manually. For example like this:
             -->
     <target depends="init" name="deps-clean" unless="no.deps">
         <ant antfile="${project.addressbook-lib}/build.xml" inheritall="false" target="clean"/>
+        <ant antfile="${project.addressbook-lib-1}/build.xml" inheritall="false" target="clean"/>
         <ant antfile="${project.addressbook-mailer}/build.xml" inheritall="false" target="clean"/>
     </target>
     <target depends="init" name="do-clean">
index 51588a8257b0df0c96c536f0a12d2f6ecc191d15..b197c419e8fb2e31f983002483398828f9fee14a 100644 (file)
@@ -3,6 +3,6 @@ build.xml.script.CRC32=be5f34f7
 build.xml.stylesheet.CRC32=651128d4@1.68.1.1
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=4a1292ce
-nbproject/build-impl.xml.script.CRC32=5b321d36
+nbproject/build-impl.xml.data.CRC32=f889023f
+nbproject/build-impl.xml.script.CRC32=4cc79cb6
 nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.75.1.1
index de0dc21c7cc1921a392641acd50c9b95d757947a..7ce55d8478010eff64837a220e799c840afb57c8 100644 (file)
@@ -37,6 +37,7 @@ endorsed.classpath=
 excludes=
 file.reference.cdi-api.jar=lib/cdi-api.jar
 file.reference.gf-client.jar=lib/gf-client.jar
+file.reference.jaddressbook-core.jar=lib/jaddressbook-core.jar
 file.reference.jcontacts-business-core.jar=lib/jcontacts-business-core.jar
 file.reference.jcontacts-core.jar=lib/jcontacts-core.jar
 file.reference.jcontacts-lib.jar=lib/jcontacts-lib.jar
@@ -75,6 +76,7 @@ javac.classpath=\
     ${file.reference.jphone-lib.jar}:\
     ${file.reference.juser-core.jar}:\
     ${file.reference.juser-lib.jar}:\
+    ${file.reference.jaddressbook-core.jar}:\
     ${reference.addressbook-lib.jar}:\
     ${reference.addressbook-mailer.jar}:\
     ${file.reference.cdi-api.jar}:\
@@ -108,8 +110,10 @@ lib.dir=${web.docbase.dir}/WEB-INF/lib
 persistence.xml.dir=${conf.dir}
 platform.active=default_platform
 project.addressbook-lib=../addressbook-lib
+project.addressbook-lib-1=../../NetBeansProjects/addressbook-lib
 project.addressbook-mailer=../../NetBeansProjects/addressbook-mailer
 project.license=agpl30
+reference.addressbook-lib-1.jar=${project.addressbook-lib-1}/dist/addressbook-lib.jar
 reference.addressbook-lib.jar=${project.addressbook-lib}/dist/addressbook-lib.jar
 reference.addressbook-mailer.jar=${project.addressbook-mailer}/dist/addressbook-mailer.jar
 resource.dir=setup
@@ -120,6 +124,7 @@ run.test.classpath=\
 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
 runmain.jvmargs=
 source.encoding=UTF-8
+source.reference.jaddressbook-core.jar=../jaddressbook-core/src/
 source.reference.jcontacts-business-core.jar=../jcontacts-business-core/src/
 source.reference.jcontacts-core.jar=../jcontacts-core/src/
 source.reference.jcontacts-lib.jar=../jcontacts-lib/src/
index 0d7766ce1bcbbb5fa3ca00074415d815334f9803..c57c6de6c923a0f5880c83707fc74c4e64fbb193 100644 (file)
@@ -32,7 +32,6 @@
                 </library>
                 <library dirs="200">
                     <file>${file.reference.jcontacts-business-core.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
                     <file>${file.reference.jcontacts-lib.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
-                    <file>${reference.addressbook-lib.jar}</file>
+                    <file>${file.reference.jaddressbook-core.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
+                <library dirs="200">
+                    <file>${reference.addressbook-lib.jar}</file>
+                </library>
                 <library dirs="200">
                     <file>${reference.addressbook-mailer.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
                     <file>${file.reference.cdi-api.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
                     <file>${file.reference.gf-client.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
             </web-module-libraries>
             <web-module-additional-libraries/>
                 <clean-target>clean</clean-target>
                 <id>jar</id>
             </reference>
+            <reference>
+                <foreign-project>addressbook-lib-1</foreign-project>
+                <artifact-type>jar</artifact-type>
+                <script>build.xml</script>
+                <target>jar</target>
+                <clean-target>clean</clean-target>
+                <id>jar</id>
+            </reference>
             <reference>
                 <foreign-project>addressbook-mailer</foreign-project>
                 <artifact-type>jar</artifact-type>
index 03cda15f82d86f68b80abd724d8774fb75ced205..3a5347e0606e0fba9e0a4834dcff5dc8d370e10e 100644 (file)
@@ -36,14 +36,14 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
-import org.mxchange.addressbook.events.addressbook.AddressbookLoadedEvent;
-import org.mxchange.addressbook.events.addressbook.LoadedAddressbookEvent;
-import org.mxchange.addressbook.exceptions.AddressbookNameAlreadyUsedException;
-import org.mxchange.addressbook.exceptions.AddressbookNotFoundException;
-import org.mxchange.addressbook.model.addressbook.Addressbook;
 import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote;
-import org.mxchange.addressbook.model.addressbook.UserAddressbook;
-import org.mxchange.addressbook.model.addressbook.entry.AddressbookEntry;
+import org.mxchange.jaddressbookcore.events.addressbook.AddressbookLoadedEvent;
+import org.mxchange.jaddressbookcore.events.addressbook.LoadedAddressbookEvent;
+import org.mxchange.jaddressbookcore.exceptions.AddressbookNameAlreadyUsedException;
+import org.mxchange.jaddressbookcore.exceptions.AddressbookNotFoundException;
+import org.mxchange.jaddressbookcore.model.addressbook.Addressbook;
+import org.mxchange.jaddressbookcore.model.addressbook.UserAddressbook;
+import org.mxchange.jaddressbookcore.model.addressbook.entry.AddressbookEntry;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.model.user.User;
 
index ec6b3f93fb3b1144a56ab5bebeed8be5e0cab57e..942b1c7cbd6b8a4c359550415a34a7eb3f0c506c 100644 (file)
@@ -19,9 +19,9 @@ package org.mxchange.addressbook.beans.addressbook;
 import java.io.Serializable;
 import java.util.Calendar;
 import java.util.List;
-import org.mxchange.addressbook.events.addressbook.AddressbookLoadedEvent;
-import org.mxchange.addressbook.model.addressbook.Addressbook;
-import org.mxchange.addressbook.model.addressbook.entry.AddressbookEntry;
+import org.mxchange.jaddressbookcore.events.addressbook.AddressbookLoadedEvent;
+import org.mxchange.jaddressbookcore.model.addressbook.Addressbook;
+import org.mxchange.jaddressbookcore.model.addressbook.entry.AddressbookEntry;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.model.user.User;
 
diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java
new file mode 100644 (file)
index 0000000..ae08b08
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.beans.helper;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for general bean helper
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface AddressbookAdminWebRequestController extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getUser ();
+
+       /**
+        * Setter for user instance
+        * <p>
+        * @param user User instance
+        */
+       void setUser (final User user);
+
+}
diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java
new file mode 100644 (file)
index 0000000..f00ec66
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.beans.helper;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Named;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A general helper for beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("adminHelper")
+@RequestScoped
+public class AddressbookAdminWebRequestHelper implements AddressbookAdminWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 17_258_793_567_145_701L;
+
+       /**
+        * User instance
+        */
+       private User user;
+
+       /**
+        * Default constructor
+        */
+       public AddressbookAdminWebRequestHelper () {
+       }
+
+       @Override
+       public User getUser () {
+               return this.user;
+       }
+
+       @Override
+       public void setUser (final User user) {
+               this.user = user;
+       }
+
+}
index 75275f3918d02c4b71bd3531f962c6398f93d6ef..e0706b73c31ef92d21e6840645ce76d3bb7f3392 100644 (file)
@@ -32,13 +32,13 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
-import org.mxchange.addressbook.events.sharing.AddressbookSharingEvent;
-import org.mxchange.addressbook.events.sharing.StartedAddressbookSharingEvent;
-import org.mxchange.addressbook.events.sharing.type.SharingType;
-import org.mxchange.addressbook.exceptions.UserAlreadySharingAddressbookException;
-import org.mxchange.addressbook.model.addressbook.Addressbook;
-import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook;
 import org.mxchange.addressbook.model.shared.SharedAddressbooksSessionBeanRemote;
+import org.mxchange.jaddressbookcore.events.sharing.AddressbookSharingEvent;
+import org.mxchange.jaddressbookcore.events.sharing.StartedAddressbookSharingEvent;
+import org.mxchange.jaddressbookcore.events.sharing.type.SharingType;
+import org.mxchange.jaddressbookcore.exceptions.UserAlreadySharingAddressbookException;
+import org.mxchange.jaddressbookcore.model.addressbook.Addressbook;
+import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbook;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
index a6926248117ee5257b91573ab93e6a7c47505ef8..a92576f26a9568c750ef4025076735c7242fc43c 100644 (file)
@@ -18,9 +18,9 @@ package org.mxchange.addressbook.beans.shares;
 
 import java.io.Serializable;
 import java.util.List;
-import org.mxchange.addressbook.events.sharing.AddressbookSharingEvent;
-import org.mxchange.addressbook.model.addressbook.Addressbook;
-import org.mxchange.addressbook.model.addressbook.shared.ShareableAddressbook;
+import org.mxchange.jaddressbookcore.events.sharing.AddressbookSharingEvent;
+import org.mxchange.jaddressbookcore.model.addressbook.Addressbook;
+import org.mxchange.jaddressbookcore.model.addressbook.shared.ShareableAddressbook;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.model.user.User;
 
index 9396c8b1d15dc80c848155b1fbc35a46cb607fba..0fdcb19947c3ad782deec6f2e934d02d5b8c7027 100644 (file)
@@ -8,6 +8,10 @@
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
+       <f:metadata>
+               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+       </f:metadata>
+
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
                <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_USER}</ui:define>
 
@@ -16,6 +20,8 @@
                </ui:define>
 
                <ui:define name="content">
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
+
                        Here goes your content.
                </ui:define>
        </ui:composition>
index 1e3bf5d9af236d90bd3c134f983215830056cba1..4d3c97fe8aace47a02efc8a6a31bef75e91718f6 100644 (file)
@@ -8,6 +8,10 @@
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
+       <f:metadata>
+               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+       </f:metadata>
+
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
                <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_USER}</ui:define>
 
@@ -16,6 +20,8 @@
                </ui:define>
 
                <ui:define name="content">
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
+
                        Here goes your content.
                </ui:define>
        </ui:composition>
index 2e45ef7344c5235c9530b4de9d2d49511a8ddcc5..f9caa671d849a7dd09b40b60217348b43da8b380 100644 (file)
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
-       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       >
-
-       <f:metadata>
-               <f:viewParam name="userId" value="#{user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_USER}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_SHOW_USER}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty user}" />
-
-                       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty user}">
-                               <f:facet name="header">
-                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">
-                                               <f:param value="#{user.userName}" />
-                                               <f:param value="#{user.userId}" />
-                                       </h:outputFormat>
-                               </f:facet>
-
-                               <h:column>
-                                       <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ID}" />
-
-                                       <h:outputText id="userId" styleClass="data_field" value="#{user.userId}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_NAME}" />
-
-                                       <h:outputText id="userName" styleClass="data_field" value="#{user.userName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CREATED}" />
-
-                                       <h:outputText id="userCreated" styleClass="data_field" value="#{user.userCreated.time}">
-                                               <f:convertDateTime for="userCreated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_UPDATED}" />
-
-                                       <h:outputText id="userUpdated" styleClass="data_field" value="#{user.userUpdated.time}">
-                                               <f:convertDateTime for="userUpdated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userAccountStatus" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ACCOUNT_STATUS}" />
-
-                                       <h:outputText id="userAccountStatus" styleClass="data_field #{user.userAccountStatus.styleClass}" value="#{msg[user.userAccountStatus.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userProfileMode" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_PROFILE_MODE}" />
-
-                                       <h:outputText id="userProfileMode" styleClass="data_field" value="#{msg[user.userProfileMode.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userLastLocked" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_LAST_LOCKED}" />
-
-                                       <h:outputText id="userLastLocked" styleClass="data_field" value="#{user.userLastLocked.time}">
-                                               <f:convertDateTime for="userLastLocked" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="lastLockedReason" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_LAST_LOCKED_REASON}" />
-
-                                       <h:outputText id="lastLockedReason" styleClass="data_field" value="#{user.lastLockedReason}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CONTACT_CREATED}" />
-
-                                       <h:outputText id="contactCreated" styleClass="data_field" value="#{user.userContact.contactCreated.time}">
-                                               <f:convertDateTime for="contactCreated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CONTACT_UPDATED}" />
-
-                                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{user.userContact.contactUpdated.time}">
-                                               <f:convertDateTime for="contactUpdated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_IS_OWN_CONTACT}" />
-
-                                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{user.userContact.isOwnContact()}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_GENDER}" />
-
-                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[user.userContact.contactGender.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_TITLE}" />
-
-                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{user.userContact.contactTitle}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_FIRST_NAME}" />
-
-                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{user.userContact.contactFirstName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_FAMILY_NAME}" />
-
-                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{user.userContact.contactFamilyName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_STREET}" />
-
-                                       <h:outputText id="contactStreet" styleClass="data_field" value="#{user.userContact.contactStreet}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_HOUSE_NUMBER}" />
-
-                                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{user.userContact.contactHouseNumber}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ZIP_CODE}" />
-
-                                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{user.userContact.contactZipCode}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CITY}" />
-
-                                       <h:outputText id="contactCity" styleClass="data_field" value="#{user.userContact.contactCity}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_EMAIL_ADDRESS}" />
-
-                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{user.userContact.contactEmailAddress}">
-                                               <h:outputText value="#{user.userContact.contactEmailAddress}" />
-                                       </h:outputLink>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_BIRTHDAY}" />
-
-                                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{user.userContact.contactBirthday.time}">
-                                               <f:convertDateTime for="contactBirthday" type="date" />
-                                       </h:outputText>
-                               </h:column>
-                       </h:panelGrid>
-
-                       <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl">
-                               <ui:param name="user" value="#{user}" />
-                       </ui:include>
-
-                       <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">
-                               <ui:param name="cellphoneNumber" value="#{user.userContact.contactCellphoneNumber}" />
-                               <ui:param name="user" value="#{user}" />
-                       </ui:include>
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_USER}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_SHOW_USER}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />\r
+\r
+                       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty adminHelper.user}">\r
+                               <f:facet name="header">\r
+                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">\r
+                                               <f:param value="#{adminHelper.user.userName}" />\r
+                                               <f:param value="#{adminHelper.user.userId}" />\r
+                                       </h:outputFormat>\r
+                               </f:facet>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ID}" />\r
+\r
+                                       <h:outputText id="userId" styleClass="data_field" value="#{adminHelper.user.userId}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_NAME}" />\r
+\r
+                                       <h:outputText id="userName" styleClass="data_field" value="#{adminHelper.user.userName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CREATED}" />\r
+\r
+                                       <h:outputText id="userCreated" styleClass="data_field" value="#{adminHelper.user.userCreated.time}">\r
+                                               <f:convertDateTime for="userCreated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_UPDATED}" />\r
+\r
+                                       <h:outputText id="userUpdated" styleClass="data_field" value="#{adminHelper.user.userUpdated.time}">\r
+                                               <f:convertDateTime for="userUpdated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userAccountStatus" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ACCOUNT_STATUS}" />\r
+\r
+                                       <h:outputText id="userAccountStatus" styleClass="data_field #{adminHelper.user.userAccountStatus.styleClass}" value="#{msg[adminHelper.user.userAccountStatus.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userProfileMode" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_PROFILE_MODE}" />\r
+\r
+                                       <h:outputText id="userProfileMode" styleClass="data_field" value="#{msg[adminHelper.user.userProfileMode.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userLastLocked" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_LAST_LOCKED}" />\r
+\r
+                                       <h:outputText id="userLastLocked" styleClass="data_field" value="#{adminHelper.user.userLastLocked.time}">\r
+                                               <f:convertDateTime for="userLastLocked" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="lastLockedReason" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_LAST_LOCKED_REASON}" />\r
+\r
+                                       <h:outputText id="lastLockedReason" styleClass="data_field" value="#{adminHelper.user.lastLockedReason}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CONTACT_CREATED}" />\r
+\r
+                                       <h:outputText id="contactCreated" styleClass="data_field" value="#{adminHelper.user.userContact.contactCreated.time}">\r
+                                               <f:convertDateTime for="contactCreated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CONTACT_UPDATED}" />\r
+\r
+                                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{adminHelper.user.userContact.contactUpdated.time}">\r
+                                               <f:convertDateTime for="contactUpdated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_IS_OWN_CONTACT}" />\r
+\r
+                                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{adminHelper.user.userContact.isOwnContact()}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_GENDER}" />\r
+\r
+                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[adminHelper.user.userContact.contactGender.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_TITLE}" />\r
+\r
+                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{adminHelper.user.userContact.contactTitle}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_FIRST_NAME}" />\r
+\r
+                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{adminHelper.user.userContact.contactFirstName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_FAMILY_NAME}" />\r
+\r
+                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{adminHelper.user.userContact.contactFamilyName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_STREET}" />\r
+\r
+                                       <h:outputText id="contactStreet" styleClass="data_field" value="#{adminHelper.user.userContact.contactStreet}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_HOUSE_NUMBER}" />\r
+\r
+                                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{adminHelper.user.userContact.contactHouseNumber}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_ZIP_CODE}" />\r
+\r
+                                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{adminHelper.user.userContact.contactZipCode}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_CITY}" />\r
+\r
+                                       <h:outputText id="contactCity" styleClass="data_field" value="#{adminHelper.user.userContact.contactCity}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_EMAIL_ADDRESS}" />\r
+\r
+                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{adminHelper.user.userContact.contactEmailAddress}">\r
+                                               <h:outputText value="#{adminHelper.user.userContact.contactEmailAddress}" />\r
+                                       </h:outputLink>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_SHOW_USER_BIRTHDAY}" />\r
+\r
+                                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{adminHelper.user.userContact.contactBirthday.time}">\r
+                                               <f:convertDateTime for="contactBirthday" type="date" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+                       </h:panelGrid>\r
+\r
+                       <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl">\r
+                               <ui:param name="user" value="#{adminHelper.user}" />\r
+                       </ui:include>\r
+\r
+                       <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">\r
+                               <ui:param name="cellphoneNumber" value="#{adminHelper.user.userContact.contactCellphoneNumber}" />\r
+                               <ui:param name="user" value="#{adminHelper.user}" />\r
+                       </ui:include>\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
index 5f45befce45c174fd3905c263db8fea771a6b87a..fe96f5512baed7fceab3e970ce1e017cb8e154d7 100644 (file)
@@ -8,6 +8,10 @@
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
+       <f:metadata>
+               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+       </f:metadata>
+
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
                <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}</ui:define>
 
@@ -16,6 +20,8 @@
                </ui:define>
 
                <ui:define name="content">
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
+
                        Here goes your content.
                </ui:define>
        </ui:composition>