]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued with data export with PrimeFaces:
authorRoland Häder <roland@mxchange.org>
Fri, 20 May 2016 10:32:12 +0000 (12:32 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 21 May 2016 11:04:33 +0000 (13:04 +0200)
- added prime faces 5.3 to project
- added admin_contact_export.xhtml with navigation rule to export contact data (currently only CSV but e.g. Excel is easy to add)
- added missing contact i18n and export string
- added controller methods generatePhoneNumber() and generateCellphoneNumber(), if e.g. ui:fragment is used, an object id instead of the phone numbers is shown. Maybe a bug in PrimeFaces or wrong usage of ui:fragment? Sometimes a POJO property like contactFaxNumber can be null. Then this needs to be taken care of.

Signed-off-by: Roland Häder <roland@mxchange.org>
13 files changed:
lib/nblibraries.properties
lib/primefaces/primefaces-5.3.jar [new file with mode: 0644]
nbproject/build-impl.xml
nbproject/faces-config.NavData
nbproject/project.properties
nbproject/project.xml
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestController.java
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/admin/admin_menu.tpl
web/admin/contact/admin_contact_export.xhtml [new file with mode: 0644]

index 6d0afb59d64978f1c42b37eda93de4d6acaa674c..15ca34e36d020a5631209c7c8ec9d0486820c6cd 100644 (file)
@@ -2,3 +2,8 @@ libs.CopyLibs.classpath=\
     ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
 libs.CopyLibs.displayName=CopyLibs Task
 libs.CopyLibs.prop-version=2.0
+libs.primefaces.classpath=\
+    ${base}/primefaces/primefaces-5.3.jar
+libs.primefaces.displayName=PrimeFaces 5.3
+libs.primefaces.prop-maven-dependencies=\n                org.primefaces:primefaces:5.3:jar\n
+libs.primefaces.prop-maven-repositories=default:http://repository.primefaces.org/
diff --git a/lib/primefaces/primefaces-5.3.jar b/lib/primefaces/primefaces-5.3.jar
new file mode 100644 (file)
index 0000000..6865631
Binary files /dev/null and b/lib/primefaces/primefaces-5.3.jar differ
index 587d7bd98fff2ae7d67b7b1513b4bc7ad898e3ac..0c2513931a1da079e1ae7b398ad0cfe5207f4099 100644 (file)
@@ -821,9 +821,9 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
     <target name="-init-taskdefs">
         <fail unless="libs.CopyLibs.classpath">
 The libs.CopyLibs.classpath property is not set up.
-This property must point to 
+This property must point to
 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
-of NetBeans IDE installation and is usually located at 
+of NetBeans IDE installation and is usually located at
 &lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
 Either open the project in the IDE and make sure CopyLibs library
 exists or setup the property manually. For example like this:
@@ -1036,48 +1036,36 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
     <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
-        <copyfiles files="${file.reference.jcore-logger-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.jcoreee.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
+        <copyfiles files="${file.reference.jcore-logger-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <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.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.jcontacts-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="${file.reference.jcustomer-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${file.reference.jcustomer-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${file.reference.jshop-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${file.reference.jshop-ee-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${file.reference.pizzaservice-core.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
-        <copyfiles files="${reference.pizzaservice-lib.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
         <copyfiles files="${reference.pizzaservice-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"/>
+        <copyfiles files="${libs.primefaces.classpath}" 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>
     <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
-        <copyfiles files="${file.reference.jcore-logger-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.jcoreee.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
+        <copyfiles files="${file.reference.jcore-logger-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <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.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.jcontacts-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="${file.reference.jcustomer-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${file.reference.jcustomer-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${file.reference.jshop-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${file.reference.jshop-ee-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${file.reference.pizzaservice-core.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
-        <copyfiles files="${reference.pizzaservice-lib.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
         <copyfiles files="${reference.pizzaservice-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"/>
+        <copyfiles files="${libs.primefaces.classpath}" 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"/>
@@ -1390,7 +1378,7 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/>
     <!--
-                
+
                 TEST COMPILATION SECTION
             -->
     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
@@ -1429,7 +1417,7 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
     <!--
-                
+
                 TEST EXECUTION SECTION
             -->
     <target depends="init" if="have.tests" name="-pre-test-run">
@@ -1465,7 +1453,7 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
     <!--
-                
+
                 TEST DEBUGGING SECTION
             -->
     <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
@@ -1487,11 +1475,12 @@ exists or setup the property manually. For example like this:
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
     <!--
-                
+
                 CLEANUP SECTION
             -->
     <target depends="init" name="deps-clean" unless="no.deps">
         <ant antfile="${project.pizzaservice-lib}/build.xml" inheritall="false" target="clean"/>
+        <ant antfile="${project.pizzaservice-lib-1}/build.xml" inheritall="false" target="clean"/>
         <ant antfile="${project.pizzaservice-mailer}/build.xml" inheritall="false" target="clean"/>
     </target>
     <target depends="init" name="do-clean">
index 28f251cda6884d7d86e55d191064a44eace137a3..2d20ca6128755bcdfb3a5fb254397b001fdc4957 100644 (file)
@@ -2,80 +2,81 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/customer/admin_customer_delete.xhtml" x="1650" y="750" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="customer/checkout2.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="900" y="1200" zoom="true"/>
-        <Node id="privacy.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="guest/user/show_addressbook.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="1400" y="900" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="admin/index.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="user/login_own_addressbooks.xhtml" x="2150" y="600" zoom="true"/>
-        <Node id="customer/register.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="user/login_user_data_saved.xhtml" x="2650" y="150" zoom="true"/>
-        <Node id="item_added.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="admin/category/admin_category_list.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="user/login_data_saved.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="customer/lost_passwd.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="guest/user/user_list.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="index.xhtml" x="1900" y="750" zoom="true"/>
-        <Node id="user/login_edit_user_data.xhtml" x="1650" y="900" zoom="true"/>
-        <Node id="customer/checkout_done.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="customer/login.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="*" x="900" y="750" zoom="true"/>
-        <Node id="admin/customer/admin_customer_unlock.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="user/login_index.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="admin/product/admin_product_edit.xhtml" x="1150" y="1050" zoom="true"/>
-        <Node id="guest/user/lost_passwd.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="guest/user/register_done.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="guest/user/show_addressbook_entries.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="user/login.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="2900" y="150" zoom="true"/>
-        <Node id="admin/customer/admin_customer_edit.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="user/login_change_password.xhtml" x="650" y="1200" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1900" y="600" zoom="true"/>
-        <Node id="customer/checkout.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="guest/user/user_profile.xhtml" x="150" y="1650" zoom="true"/>
-        <Node id="admin/product/admin_product_delete.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="guest/user/confirm_account.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="basket.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="exception.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="1150" y="1200" zoom="true"/>
-        <Node id="admin/category/admin_category_delete.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="2400" y="300" zoom="true"/>
-        <Node id="guest/user/register_page2.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="terms.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="400" y="1350" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="2400" y="450" zoom="true"/>
-        <Node id="user/login_change_personal_data.xhtml" x="2150" y="450" zoom="true"/>
-        <Node id="admin/category/admin_category_edit.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="logout.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="2650" y="300" zoom="true"/>
-        <Node id="user/login_add_addressbook.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="user/login_contact_data_saved.xhtml" x="400" y="1500" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="imprint.xhtml" x="650" y="1350" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="guest/user/login.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="admin/customer/admin_customer_list.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="guest/user/register.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="user/login_change_email_address.xhtml" x="1400" y="1050" zoom="true"/>
-        <Node id="admin/product/admin_product_list.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="admin/customer/admin_customer_show.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="customer/empty_basket.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="admin/customer/admin_customer_delete.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="customer/checkout2.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="privacy.xhtml" x="1400" y="900" zoom="true"/>
+        <Node id="guest/user/show_addressbook.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="2650" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="400" y="1500" zoom="true"/>
+        <Node id="admin/index.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="user/login_own_addressbooks.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="user/login_user_data_saved.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="customer/register.xhtml" x="1650" y="750" zoom="true"/>
+        <Node id="admin/category/admin_category_list.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="item_added.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="user/login_data_saved.xhtml" x="900" y="1200" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="customer/lost_passwd.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="index.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="guest/user/user_list.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="user/login_edit_user_data.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="customer/checkout_done.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="customer/login.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="*" x="2150" y="600" zoom="true"/>
+        <Node id="admin/customer/admin_customer_unlock.xhtml" x="900" y="1350" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="admin/product/admin_product_edit.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="guest/user/lost_passwd.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="guest/user/register_done.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="guest/user/show_addressbook_entries.xhtml" x="2400" y="300" zoom="true"/>
+        <Node id="user/login.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="admin/customer/admin_customer_edit.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="2900" y="150" zoom="true"/>
+        <Node id="user/login_change_password.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1650" y="900" zoom="true"/>
+        <Node id="admin/contact/admin_contact_export.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="customer/checkout.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="guest/user/user_profile.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="admin/product/admin_product_delete.xhtml" x="1150" y="1200" zoom="true"/>
+        <Node id="guest/user/confirm_account.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="basket.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="exception.xhtml" x="2650" y="150" zoom="true"/>
+        <Node id="admin/category/admin_category_delete.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="1900" y="600" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="guest/user/register_page2.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="terms.xhtml" x="2150" y="450" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="user/login_change_personal_data.xhtml" x="2400" y="450" zoom="true"/>
+        <Node id="admin/category/admin_category_edit.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="logout.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="user/login_add_addressbook.xhtml" x="150" y="1650" zoom="true"/>
+        <Node id="user/login_contact_data_saved.xhtml" x="1400" y="1050" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="imprint.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="1150" y="1050" zoom="true"/>
+        <Node id="admin/customer/admin_customer_list.xhtml" x="650" y="1350" zoom="true"/>
+        <Node id="guest/user/register.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="user/login_change_email_address.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="admin/product/admin_product_list.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="admin/customer/admin_customer_show.xhtml" x="1900" y="750" zoom="true"/>
+        <Node id="customer/empty_basket.xhtml" x="650" y="1200" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index e5414d72b6c29d7f8e49eafe768d11e16137cb1a..8afb3ae44de298fd335e584a6ef0bfd5e772aec9 100644 (file)
@@ -84,7 +84,8 @@ javac.classpath=\
     ${reference.pizzaservice-lib.jar}:\
     ${reference.pizzaservice-mailer.jar}:\
     ${file.reference.cdi-api.jar}:\
-    ${file.reference.gf-client.jar}
+    ${file.reference.gf-client.jar}:\
+    ${libs.primefaces.classpath}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
 javac.debug=true
index 1c8d235fe94315f79d5a7edc617148a436daf340..a378bc4f9b0fb1d40779539a61158319edad752a 100644 (file)
@@ -7,11 +7,11 @@
             <minimum-ant-version>1.6.5</minimum-ant-version>
             <web-module-libraries>
                 <library dirs="200">
-                    <file>${file.reference.jcore-logger-lib.jar}</file>
+                    <file>${file.reference.jcoreee.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
-                    <file>${file.reference.jcoreee.jar}</file>
+                    <file>${file.reference.jcore-logger-lib.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
                     <file>${file.reference.jcountry-lib.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
-                <library dirs="200">
-                    <file>${file.reference.jphone-core.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
-                </library>
-                <library dirs="200">
-                    <file>${file.reference.jphone-lib.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
-                </library>
                 <library dirs="200">
                     <file>${file.reference.jcontacts-core.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
-                    <file>${file.reference.juser-core.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
-                </library>
-                <library dirs="200">
-                    <file>${file.reference.juser-lib.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
-                </library>
-                <library dirs="200">
-                    <file>${file.reference.jcustomer-core.jar}</file>
+                    <file>${file.reference.jphone-core.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
-                    <file>${file.reference.jcustomer-lib.jar}</file>
+                    <file>${file.reference.jphone-lib.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
-                    <file>${file.reference.jshop-core.jar}</file>
+                    <file>${file.reference.juser-core.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
-                    <file>${file.reference.jshop-ee-lib.jar}</file>
+                    <file>${file.reference.juser-lib.jar}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
@@ -68,7 +52,6 @@
                 </library>
                 <library dirs="200">
                     <file>${reference.pizzaservice-lib.jar}</file>
-                    <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
                 <library dirs="200">
                     <file>${reference.pizzaservice-mailer.jar}</file>
                 </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>
+                </library>
+                <library dirs="200">
+                    <file>${libs.primefaces.classpath}</file>
                     <path-in-war>WEB-INF/lib</path-in-war>
                 </library>
             </web-module-libraries>
                 <clean-target>clean</clean-target>
                 <id>jar</id>
             </reference>
+            <reference>
+                <foreign-project>pizzaservice-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>pizzaservice-mailer</foreign-project>
                 <artifact-type>jar</artifact-type>
index f5ca82b10529b6232bb393ed9d9dd29377f891d7..9b7a938b0e4edd76c269502e09751f1bf26b8445 100644 (file)
@@ -512,3 +512,14 @@ BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Account best\u00e4tigen
 ADMIN_MENU_CONTACT_TITLE=Manage contact data
 LINK_ADMIN_LIST_CONTACT=Kontaktdaten auflisten
 LINK_ADMIN_LIST_CONTACT_TITLE=Listet alle Kontaktdaten auf, egal wo her sie angelegt wurden.
+ADMIN_CONTACT_COUNTRY_CODE=L\u00e4ndercode:
+ADMIN_CONTACT_CELLPHONE_NUMBER=Handynummer:
+ADMIN_CONTACT_LANDLINE_NUMBER=Telefonnummer:
+ADMIN_CONTACT_FAX_NUMBER=Faxnummer:
+PAGE_TITLE_ADMIN_EXPORT_CONTACT=Kontaktdaten exportieren
+CONTENT_TITLE_ADMIN_EXPORT_CONTACT=Kontaktdaten exportieren:
+ADMIN_EXPORT_CONTACTS_TITLE=Datenexport starten
+ADMIN_EXPORT_CONTACTS_TIMEOUT_WARNING=Bei sehr gro\u00dfen Datenmengen kann es eventuell zu Zeit\u00fcberschreitungen kommen. Daher sollten Sie besser seitenweise exportieren.
+BUTTON_ADMIN_EXPORT_CONTACTS_CSV=Alle Daten als CSV-Datei exportieren
+LINK_ADMIN_EXPORT_CONTACT=Daten exportieren
+LINK_ADMIN_EXPORT_CONTACT_TITLE=Kontaktdaten exportieren
index 2e39a1cea7d08845211f212a191fc40a649f3d96..5bb27e6291653abbd3075e7c9b1f0215baba6dd7 100644 (file)
@@ -496,3 +496,15 @@ BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Confirm account
 ADMIN_MENU_CONTACT_TITLE=Manage contact data
 LINK_ADMIN_LIST_CONTACT=List contact data
 LINK_ADMIN_LIST_CONTACT_TITLE=Lists all contact data regardless where they was created.
+ADMIN_CONTACT_COUNTRY_CODE=Country code:
+ADMIN_CONTACT_CELLPHONE_NUMBER=Cellphone number:
+ADMIN_CONTACT_LANDLINE_NUMBER=Phone number:
+ADMIN_CONTACT_FAX_NUMBER=Fax number:
+PAGE_TITLE_ADMIN_EXPORT_CONTACT=Export contact data
+CONTENT_TITLE_ADMIN_EXPORT_CONTACT=Export contact data:
+ADMIN_EXPORT_CONTACTS_TITLE=Start data export
+#Bei sehr gro\u00dfen Datenmengen kann es eventuell zu Zeit\u00fcberschreitungen kommen. Daher sollten Sie besser seitenweise exportieren.
+ADMIN_EXPORT_CONTACTS_TIMEOUT_WARNING=Big data amount may lead to timeouts. You should then try to export each page separately.
+BUTTON_ADMIN_EXPORT_CONTACTS_CSV=Export all data as CSV file
+LINK_ADMIN_EXPORT_CONTACT=Export data
+LINK_ADMIN_EXPORT_CONTACT_TITLE=Export contact data
index 001a61574e1c7eea1f0f8f1e1eb4e77557052a07..6b3ef417dfa8afecb145669cd9e07eada13f64a8 100644 (file)
@@ -40,6 +40,7 @@ import org.mxchange.jcontacts.events.contact.update.AdminContactUpdatedEvent;
 import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
 import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
 import org.mxchange.jcountry.data.Country;
+import org.mxchange.jphone.phonenumbers.DialableNumber;
 import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
@@ -472,6 +473,46 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                return "admin_list_contact"; //NOI18N
        }
 
+       @Override
+       public String generateCellphoneNumber (final DialableCellphoneNumber cellphoneNumber) {
+               // Is it null?
+               if (null == cellphoneNumber) {
+                       // Return null
+                       return null;
+               }
+
+               // Get all data
+               String number = String.format(
+                          "%s%d%d", //NOI18N
+                          cellphoneNumber.getCellphoneProvider().getProviderCountry().getCountryExternalDialPrefix(),
+                          cellphoneNumber.getCellphoneProvider().getProviderDialPrefix(),
+                          cellphoneNumber.getPhoneNumber()
+          );
+
+               // Return it
+               return number;
+       }
+
+       @Override
+       public String generatePhoneNumber (final DialableNumber phoneNumber) {
+               // Is it null?
+               if (null == phoneNumber) {
+                       // Return null
+                       return null;
+               }
+
+               // Generate it
+               String number = String.format(
+                          "%s%d%d", //NOI18N
+                          phoneNumber.getPhoneCountry().getCountryExternalDialPrefix(),
+                          phoneNumber.getPhoneAreaCode(),
+                          phoneNumber.getPhoneNumber()
+          );
+
+               // Return it
+               return number;
+       }
+
        @Override
        @SuppressWarnings ("ReturnOfDateField")
        public Date getBirthday () {
index 8a379d9bef4758ffb1ecac9dfdd84820a1471a19..d86125839d536588cdbdf1b6ec25d59d5b4c1b4e 100644 (file)
@@ -21,6 +21,8 @@ import java.util.Date;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcountry.data.Country;
+import org.mxchange.jphone.phonenumbers.DialableNumber;
+import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 
 /**
@@ -381,4 +383,23 @@ public interface PizzaAdminContactWebRequestController extends Serializable {
         */
        void setZipCode (final Integer zipCode);
 
+       /**
+        * Returns a text respresentation of given phone number or null if not set.
+        * <p>
+        * @param phoneNumber Phone number
+        * <p>
+        * @return Text respresentation or null
+        */
+       String generatePhoneNumber (final DialableNumber phoneNumber);
+
+       /**
+        * Returns a text representation of given cellphone number or null if not
+        * set.
+        * <p>
+        * @param cellphoneNumber Cellphone number
+        * <p>
+        * @return Text respresentation or null
+        */
+       String generateCellphoneNumber (final DialableCellphoneNumber cellphoneNumber);
+
 }
index 15d2d67676dfee83ffd7a9d871c09ab10ca2f28b..dfb51237040d4be99da8cbcac6a7884492b0e5be 100644 (file)
                        <from-outcome>admin_list_contact</from-outcome>
                        <to-view-id>/admin/contact/admin_contact_list.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_export_contact</from-outcome>
+                       <to-view-id>/admin/contact/admin_contact_export.xhtml</to-view-id>
+               </navigation-case>
                <navigation-case>
                        <from-outcome>admin_list_user</from-outcome>
                        <to-view-id>/admin/user/admin_user_list.xhtml</to-view-id>
index aad3f7b6b0d07916bd04249d066074973636cbf4..35f6b88d7b564d8331393fc45ced2de9a9623ef7 100644 (file)
@@ -38,6 +38,7 @@
 
                        <ul>
                                <li><h:link title="#{msg.LINK_ADMIN_LIST_CONTACT_TITLE}" outcome="admin_list_contact" value="#{msg.LINK_ADMIN_LIST_CONTACT}" /></li>
+                               <li><h:link title="#{msg.LINK_ADMIN_EXPORT_CONTACT_TITLE}" outcome="admin_export_contact" value="#{msg.LINK_ADMIN_EXPORT_CONTACT}" /></li>
                        </ul>
 
                        <div class="menu_header">
diff --git a/web/admin/contact/admin_contact_export.xhtml b/web/admin/contact/admin_contact_export.xhtml
new file mode 100644 (file)
index 0000000..91b6c58
--- /dev/null
@@ -0,0 +1,165 @@
+<?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"
+
+       xmlns:p="http://primefaces.org/ui">
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EXPORT_CONTACT}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_EXPORT_CONTACT}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_export_contacts">
+                               <p:dataTable id="table_export_contacts" var="contact" value="#{contactController.allContacts()}" tableStyleClass="table_big" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_CONTACT}" rendered="#{contactController.hasContacts()}">
+                                       <p:column exportable="false">
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_ID}" />
+                                               </f:facet>
+
+                                               <h:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_TITLE}" value="#{contact.contactId}">
+                                                       <f:param name="contactId" value="#{contact.contactId}" />
+                                               </h:link>
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_GENDER}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{msg[contact.contactGender.messageKey]}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_TITLE}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactTitle}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactFirstName}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactFamilyName}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_STREET}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactStreet}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactHouseNumber}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_COUNTRY_CODE}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactCountry.countryCode}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactZipCode}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_CITY}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactCity}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{contact.contactEmailAddress}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_CELLPHONE_NUMBER}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{adminContactController.generateCellphoneNumber(contact.contactCellphoneNumber)}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_LANDLINE_NUMBER}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{adminContactController.generatePhoneNumber(contact.contactLandLineNumber)}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_FAX_NUMBER}" />
+                                               </f:facet>
+
+                                               <h:outputText value="#{adminContactController.generatePhoneNumber(contact.contactFaxNumber)}" />
+                                       </p:column>
+
+                                       <p:column>
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.ADMIN_CONTACT_CREATED}" />
+                                               </f:facet>
+
+                                               <h:outputText id="contactCreated" value="#{contact.contactCreated.time}">
+                                                       <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" />
+                                               </h:outputText>
+                                       </p:column>
+                               </p:dataTable>
+
+                               <div class="table_medium">
+                                       <div class="table_header">
+                                               #{msg.ADMIN_EXPORT_CONTACTS_TITLE}
+                                       </div>
+
+                                       <div class="para">
+                                               <h:outputText value="#{msg.ADMIN_EXPORT_CONTACTS_TIMEOUT_WARNING}" />
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="submit" type="submit" id="export_contacts" value="#{msg.BUTTON_ADMIN_EXPORT_CONTACTS_CSV}">
+                                                       <p:dataExporter type="csv" target="table_export_contacts" fileName="all_contacts" />
+                                               </h:commandButton>
+                                       </div>
+                               </div>
+                       </h:form>
+               </ui:define>
+       </ui:composition>
+</html>