]> git.mxchange.org Git - addressbook-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 20 Aug 2017 23:36:16 +0000 (01:36 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 20 Aug 2017 23:41:02 +0000 (01:41 +0200)
- converted mobile-numer, profile-mode and personal-title  selection box into
  custom JSF tags (awsome stuff!)
- added ERROR_PARAMETER_LABEL_MESSAGE_NOT_SET i18n string for JSF label messages
- renamed generic.jsf.taglib.xml to widgets.jsf.taglib.xml, fitting previous
  renamings

Signed-off-by: Roland Häder <roland@mxchange.org>
30 files changed:
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/generic.jsf.taglib.xml [deleted file]
web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns.tpl [new file with mode: 0644]
web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns_mini.tpl [new file with mode: 0644]
web/WEB-INF/resources/tags/generic/messages/message_box.tpl [deleted file]
web/WEB-INF/resources/tags/generic/messages/message_box_mini.tpl [deleted file]
web/WEB-INF/resources/tags/messages/message_box.tpl [new file with mode: 0644]
web/WEB-INF/resources/tags/messages/message_box_mini.tpl [new file with mode: 0644]
web/WEB-INF/resources/tags/table_rows/mobile_selection_table_row.tpl [new file with mode: 0644]
web/WEB-INF/resources/tags/table_rows/user_personal_title_table_row.tpl [new file with mode: 0644]
web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/admin_base.tpl
web/WEB-INF/templates/admin/contact/admin_contact_data_columns.tpl [deleted file]
web/WEB-INF/templates/admin/contact/admin_contact_data_columns_mini.tpl [deleted file]
web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl
web/WEB-INF/templates/admin/contact/admin_show_contact_data.tpl
web/WEB-INF/templates/admin/mobile/admin_form_add_contact_mobile.tpl
web/WEB-INF/templates/admin/user/admin_show_user_data.tpl
web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl
web/WEB-INF/templates/contact/form_contact_data.tpl
web/WEB-INF/templates/guest/guest_base.tpl
web/WEB-INF/templates/input_fields/mobile_input_fields.tpl [deleted file]
web/WEB-INF/templates/login/user/user_base.tpl
web/WEB-INF/templates/selection_boxes/mobile_selection_box.tpl [deleted file]
web/WEB-INF/templates/selection_boxes/personal_title_selection_box.tpl [deleted file]
web/WEB-INF/templates/selection_boxes/profile_mode_selection_box.tpl [deleted file]
web/WEB-INF/web.xml
web/WEB-INF/widgets.jsf.taglib.xml [new file with mode: 0644]
web/user/login_user_change_email_address.xhtml

index d721ea26684a728f107a7b4c64adc92f239c3727..e8015afe219f2abdb412f717b75b9303c0f9ca6e 100644 (file)
@@ -898,3 +898,4 @@ ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED=Fehler: Falscher Aufruf der Anmeldesei
 BUTTON_CHANGE_LOCALE=Aendern
 #@TODO Please fix German umlauts!
 BUTTON_CHANGE_LOCALE_TITLE=Aendern Sie hier in der aktuellen Sitzung die angezeigte Sprache.
+ERROR_PARAMETER_LABEL_MESSAGE_NOT_SET=Fehler: Parameter "labelMessage" nicht gesetzt.
index faa10e88e2f294395976b8ac0d521ad0f083e454..3f687e36836c02c202d08e704fb502381916647b 100644 (file)
@@ -873,3 +873,4 @@ BUTTON_ADMIN_CONTINUE_BUSINESS_CONTACT_PERSON=Add basic data
 ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED=Error: Wrong request on registration page as the index page serves as registration page.
 BUTTON_CHANGE_LOCALE=Change
 BUTTON_CHANGE_LOCALE_TITLE=Change here in your current session the used language for text output.
+ERROR_PARAMETER_LABEL_MESSAGE_NOT_SET=Error: Parameter "labelMessage" not set.
diff --git a/web/WEB-INF/generic.jsf.taglib.xml b/web/WEB-INF/generic.jsf.taglib.xml
deleted file mode 100644 (file)
index 519b189..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (C) 2017 Roland Häder
-
-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/>.
--->
-<facelet-taglib version="2.2"
-                               xmlns="http://xmlns.jcp.org/xml/ns/javaee"
-                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                               xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd">
-       <namespace>http://mxchange.org/jsf/core/widgets</namespace>
-       <tag>
-               <tag-name>outputMessageBox</tag-name>
-               <description>This tag renders a style-able and customizable message for any kind of messages that the user should see.</description>
-               <source>resources/tags/generic/messages/message_box.tpl</source>
-               <attribute>
-                       <name>message</name>
-                       <description>The message that should be place into the message box. You may also use EL code here that resolves to a message string.</description>
-                       <required>true</required>
-                       <type>java.lang.String</type>
-               </attribute>
-               <attribute>
-                       <name>styleClass</name>
-                       <description>The optional CSS style class to be forwarded on the h:outputText's styleClass attribute of the message. The default is "okay" which normally renders as a green colored message.</description>
-                       <required>false</required>
-                       <type>java.lang.String</type>
-               </attribute>
-       </tag>
-       <tag>
-               <tag-name>outputMessageBoxMini</tag-name>
-               <description>This tag renders a style-able and customizable mini message for any kind of messages that the user should see. It is similar to outputMessageBox tag but it renders a smaller box instead.</description>
-               <source>resources/tags/generic/messages/message_box_mini.tpl</source>
-               <attribute>
-                       <name>message</name>
-                       <description>The message that should be place into the message box. You may also use EL code here that resolves to a message string.</description>
-                       <required>true</required>
-                       <type>java.lang.String</type>
-               </attribute>
-               <attribute>
-                       <name>styleClass</name>
-                       <description>The optional CSS style class to be forwarded on the h:outputText's styleClass attribute of the message. The default is "okay" which normally renders as a green colored message.</description>
-                       <required>false</required>
-                       <type>java.lang.String</type>
-               </attribute>
-       </tag>
-</facelet-taglib>
diff --git a/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns.tpl b/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns.tpl
new file mode 100644 (file)
index 0000000..1bfcb98
--- /dev/null
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- @TODO maybe later add phone numbers as "main" numbers? //-->
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:column>
+               <h:outputLabel for="contactId" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ID}" />
+
+               <h:outputText id="contactId" styleClass="table_data_field" value="#{beanHelper.contact.contactId}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactCreated" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />
+
+               <h:outputText id="contactCreated" styleClass="table_data_field" value="#{beanHelper.contact.contactCreated.time}">
+                       <f:convertDateTime for="contactCreated" type="both" />
+               </h:outputText>
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactUpdated" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />
+
+               <h:outputText id="contactUpdated" styleClass="table_data_field" value="#{beanHelper.contact.contactUpdated.time}">
+                       <f:convertDateTime for="contactUpdated" type="both" />
+               </h:outputText>
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="isOwnContact" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
+
+               <h:outputText id="isOwnContact" styleClass="table_data_field" value="#{beanHelper.contact.isOwnContact()}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactPersonalTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
+
+               <h:outputText id="contactPersonalTitle" styleClass="table_data_field" value="#{msg[beanHelper.contact.contactPersonalTitle.messageKey]}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ACADEMIC_TITLE}" />
+
+               <h:outputText id="contactTitle" styleClass="table_data_field" value="#{beanHelper.contact.contactTitle}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+
+               <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{beanHelper.contact.contactFirstName}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+
+               <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{beanHelper.contact.contactFamilyName}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactStreet" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_STREET}" />
+
+               <h:outputText id="contactStreet" styleClass="table_data_field" value="#{beanHelper.contact.contactStreet}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactHouseNumber" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
+
+               <h:outputText id="contactHouseNumber" styleClass="table_data_field" value="#{beanHelper.contact.contactHouseNumber}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactHouseNumberExtension" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER_EXTENSION}" />
+
+               <h:outputText id="contactHouseNumberExtension" styleClass="table_data_field" value="#{beanHelper.contact.contactHouseNumberExtension}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactCountry" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_COUNTRY_CODE}" />
+
+               <h:outputText id="contactCountry" styleClass="table_data_field" value="#{beanHelper.contact.contactCountry.countryCode}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactZipCode" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
+
+               <h:outputText id="contactZipCode" styleClass="table_data_field" value="#{beanHelper.contact.contactZipCode}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactCity" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_CITY}" />
+
+               <h:outputText id="contactCity" styleClass="table_data_field" value="#{beanHelper.contact.contactCity}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
+
+               <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">
+                       <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />
+               </h:outputLink>
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactBirthday" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
+
+               <h:outputText id="contactBirthday" styleClass="table_data_field" value="#{beanHelper.contact.contactBirthday.time}">
+                       <f:convertDateTime for="contactBirthday" type="date" />
+               </h:outputText>
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactComment" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_COMMENT}" />
+
+               <h:outputText id="contactComment" styleClass="table_data_field" value="#{beanHelper.contact.contactComment}" />
+       </h:column>
+</ui:composition>
diff --git a/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns_mini.tpl b/web/WEB-INF/resources/tags/admin/columns/admin_contact_data_columns_mini.tpl
new file mode 100644 (file)
index 0000000..f510a31
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- @TODO maybe later add phone numbers as "main" numbers? //-->
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:column>
+               <h:outputLabel for="contactPersonalTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
+
+               <h:outputText id="contactPersonalTitle" styleClass="table_data_field" value="#{msg[beanHelper.contact.contactPersonalTitle.messageKey]}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ACADEMIC_TITLE}" />
+
+               <h:outputText id="contactTitle" styleClass="table_data_field" value="#{beanHelper.contact.contactTitle}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+
+               <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{beanHelper.contact.contactFirstName}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+
+               <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{beanHelper.contact.contactFamilyName}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
+
+               <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">
+                       <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />
+               </h:outputLink>
+       </h:column>
+</ui:composition>
diff --git a/web/WEB-INF/resources/tags/generic/messages/message_box.tpl b/web/WEB-INF/resources/tags/generic/messages/message_box.tpl
deleted file mode 100644 (file)
index c32fdf7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       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">
-
-       <div class="message_box">
-               <div class="message_header">
-                       <h:outputText value="#{msg.MESSAGE_BOX_TITLE}" />
-               </div>
-
-               <ui:fragment rendered="#{not empty message}">
-                       <ui:fragment rendered="#{not empty styleClass}">
-                               <div class="para">
-                                       <h:outputText styleClass="#{styleClass}" value="#{message}" />
-                               </div>
-                       </ui:fragment>
-
-                       <ui:fragment rendered="#{empty styleClass}">
-                               <div class="para">
-                                       <h:outputText styleClass="okay" value="#{message}" />
-                               </div>
-                       </ui:fragment>
-               </ui:fragment>
-
-               <ui:fragment rendered="#{empty message}">
-                       <div class="errors para">
-                               <h:outputText value="#{msg.MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY}" />
-                       </div>
-               </ui:fragment>
-       </div>
-</ui:composition>
diff --git a/web/WEB-INF/resources/tags/generic/messages/message_box_mini.tpl b/web/WEB-INF/resources/tags/generic/messages/message_box_mini.tpl
deleted file mode 100644 (file)
index 35cd54a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       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">
-
-       <div class="message_box_mini">
-               <div class="message_header">
-                       <h:outputText value="#{msg.MESSAGE_BOX_TITLE}" />
-               </div>
-
-               <ui:fragment rendered="#{not empty message}">
-                       <ui:fragment rendered="#{not empty styleClass}">
-                               <div class="para">
-                                       <h:outputText styleClass="#{styleClass}" value="#{message}" />
-                               </div>
-                       </ui:fragment>
-
-                       <ui:fragment rendered="#{empty styleClass}">
-                               <div class="para">
-                                       <h:outputText styleClass="okay" value="#{message}" />
-                               </div>
-                       </ui:fragment>
-               </ui:fragment>
-
-               <ui:fragment rendered="#{empty message}">
-                       <div class="errors para">
-                               <h:outputText value="#{msg.MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY}" />
-                       </div>
-               </ui:fragment>
-       </div>
-</ui:composition>
diff --git a/web/WEB-INF/resources/tags/messages/message_box.tpl b/web/WEB-INF/resources/tags/messages/message_box.tpl
new file mode 100644 (file)
index 0000000..893620e
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       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">
+
+       <h:panelGroup styleClass="message_box_mini" layout="block" rendered="#{rendered}">
+               <div class="message_header">
+                       <h:outputText value="#{msg.MESSAGE_BOX_TITLE}" />
+               </div>
+
+               <ui:fragment rendered="#{not empty message}">
+                       <ui:fragment rendered="#{not empty styleClass}">
+                               <div class="para">
+                                       <h:outputText styleClass="#{styleClass}" value="#{message}" />
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{empty styleClass}">
+                               <div class="para">
+                                       <h:outputText styleClass="okay" value="#{message}" />
+                               </div>
+                       </ui:fragment>
+               </ui:fragment>
+
+               <ui:fragment rendered="#{empty message}">
+                       <div class="errors para">
+                               <h:outputText value="#{msg.MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY}" />
+                       </div>
+               </ui:fragment>
+       </h:panelGroup>
+</ui:composition>
diff --git a/web/WEB-INF/resources/tags/messages/message_box_mini.tpl b/web/WEB-INF/resources/tags/messages/message_box_mini.tpl
new file mode 100644 (file)
index 0000000..893620e
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       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">
+
+       <h:panelGroup styleClass="message_box_mini" layout="block" rendered="#{rendered}">
+               <div class="message_header">
+                       <h:outputText value="#{msg.MESSAGE_BOX_TITLE}" />
+               </div>
+
+               <ui:fragment rendered="#{not empty message}">
+                       <ui:fragment rendered="#{not empty styleClass}">
+                               <div class="para">
+                                       <h:outputText styleClass="#{styleClass}" value="#{message}" />
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{empty styleClass}">
+                               <div class="para">
+                                       <h:outputText styleClass="okay" value="#{message}" />
+                               </div>
+                       </ui:fragment>
+               </ui:fragment>
+
+               <ui:fragment rendered="#{empty message}">
+                       <div class="errors para">
+                               <h:outputText value="#{msg.MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY}" />
+                       </div>
+               </ui:fragment>
+       </h:panelGroup>
+</ui:composition>
diff --git a/web/WEB-INF/resources/tags/table_rows/mobile_selection_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/mobile_selection_table_row.tpl
new file mode 100644 (file)
index 0000000..4436316
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <widgets:outputMessageBoxMini message="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" styleClass="errors" rendered="#{empty targetController}" />
+
+       <widgets:outputMessageBoxMini message="#{msg.ERROR_PARAMETER_LABEL_MESSAGE_NOT_SET}" styleClass="errors" rendered="#{empty labelMessage}" />
+
+       <ui:fragment rendered="#{not empty targetController and not empty labelMessage  and (empty rendered or rendered)}">
+               <h:panelGroup styleClass="table_row" layout="block">
+                       <div class="table_left_medium">
+                               <h:outputLabel for="mobileNumber" value="#{labelMessage}" />
+                       </div>
+
+                       <div class="table_right_medium">
+                               <h:selectOneMenu styleClass="select" id="mobileProvider" value="#{targetController.mobileProvider}">
+                                       <f:converter converterId="MobileProviderConverter" />
+                                       <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                                       <f:selectItems value="#{mobileProviderController.allMobileProviders()}" var="mobileProvider" itemValue="#{mobileProvider}" itemLabel="#{mobileProvider.providerCountry.countryExternalDialPrefix}#{mobileProvider.providerDialPrefix} (#{mobileProvider.providerName})" />
+                               </h:selectOneMenu>
+
+                               <h:inputText styleClass="input" id="mobileNumber" size="10" maxlength="20" value="#{targetController.mobileNumber}">
+                                       <f:validator for="mobileNumber" validatorId="PhoneNumberValidator" />
+                               </h:inputText>
+                       </div>
+               </h:panelGroup>
+
+               <h:panelGroup styleClass="error_container" layout="block">
+                       <h:message for="mobileNumber" errorClass="errors" fatalClass="errors" warnClass="errors" />
+               </h:panelGroup>
+       </ui:fragment>
+</ui:composition>
diff --git a/web/WEB-INF/resources/tags/table_rows/user_personal_title_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/user_personal_title_table_row.tpl
new file mode 100644 (file)
index 0000000..adce3cb
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <widgets:outputMessageBoxMini message="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" styleClass="errors" rendered="#{empty targetController}" />
+
+       <ui:fragment rendered="#{not empty targetController  and (empty rendered or rendered)}">
+               <h:panelGroup styleClass="table_row" layout="block">
+                       <div class="table_left_medium">
+                               <h:outputLabel for="userPersonalTitle" value="#{msg.PERSONAL_DATA_PERSONAL_TITLE}" />
+                       </div>
+
+                       <div class="table_right_medium">
+                               <h:selectOneMenu styleClass="select" id="userPersonalTitle" value="#{targetController.personalTitle}" required="#{featureController.isFeatureEnabled(targetController.controllerType.concat('_personal_title'))}" requiredMessage="#{msg.FIELD_PERSONAL_TITLE_REQUIRED}">
+                                       <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" noSelectionOption="true" />
+                                       <f:selectItems value="#{genderController.selectableGenders}" var="personalTitle" itemValue="#{personalTitle}" itemLabel="#{msg[personalTitle.messageKey]}" />
+                               </h:selectOneMenu>
+                       </div>
+
+                       <div class="clear"></div>
+               </h:panelGroup>
+
+               <h:panelGroup styleClass="error_container" layout="block">
+                       <h:message for="userPersonalTitle" errorClass="errors" fatalClass="errors" warnClass="errors" />
+               </h:panelGroup>
+       </ui:fragment>
+</ui:composition>
diff --git a/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl b/web/WEB-INF/resources/tags/table_rows/user_profile_mode_table_row.tpl
new file mode 100644 (file)
index 0000000..132e28d
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <widgets:outputMessageBoxMini message="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" styleClass="errors" rendered="#{empty targetController}" />
+
+       <widgets:outputMessageBoxMini message="#{msg.ERROR_PARAMETER_LABEL_MESSAGE_NOT_SET}" styleClass="errors" rendered="#{empty labelMessage}" />
+
+       <ui:fragment rendered="#{not empty targetController and not empty labelMessage and (empty rendered or rendered)}">
+               <h:panelGroup styleClass="table_row" layout="block">
+                       <div class="table_left_medium">
+                               <h:outputLabel for="profileMode" value="#{labelMessage}" />
+                       </div>
+
+                       <div class="table_right_medium">
+                               <h:selectOneMenu styleClass="select" id="profileMode" value="#{targetController.userProfileMode}">
+                                       <f:selectItems value="#{profileModeController.allProfileModes}" var="mode" itemValue="#{mode}" itemLabel="#{msg[mode.messageKey]}" />
+                               </h:selectOneMenu>
+                       </div>
+
+                       <div class="clear"></div>
+               </h:panelGroup>
+
+               <h:panelGroup styleClass="error_container" layout="block">
+                       <h:message for="personalTitle" errorClass="errors" fatalClass="errors" warnClass="errors" />
+               </h:panelGroup>
+       </ui:fragment>
+</ui:composition>
index 1fd16ddac15a4ac79e61ee098bdaaa6091b1c0a9..b0e99e81fb718275f84baeba91776e2f7d9bbbcb 100644 (file)
@@ -20,6 +20,6 @@ TODO: Add something here that should be displayed on all admin pages
        </ui:define>
 
        <ui:define name="footer">
-               <ui:include id="footer" src="/WEB-INF/templates/admin/admin_footer.tpl" />
+               <ui:include src="/WEB-INF/templates/admin/admin_footer.tpl" />
        </ui:define>
 </ui:composition>
diff --git a/web/WEB-INF/templates/admin/contact/admin_contact_data_columns.tpl b/web/WEB-INF/templates/admin/contact/admin_contact_data_columns.tpl
deleted file mode 100644 (file)
index 1bfcb98..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!-- @TODO maybe later add phone numbers as "main" numbers? //-->
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
-
-       <h:column>
-               <h:outputLabel for="contactId" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ID}" />
-
-               <h:outputText id="contactId" styleClass="table_data_field" value="#{beanHelper.contact.contactId}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactCreated" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />
-
-               <h:outputText id="contactCreated" styleClass="table_data_field" value="#{beanHelper.contact.contactCreated.time}">
-                       <f:convertDateTime for="contactCreated" type="both" />
-               </h:outputText>
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactUpdated" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />
-
-               <h:outputText id="contactUpdated" styleClass="table_data_field" value="#{beanHelper.contact.contactUpdated.time}">
-                       <f:convertDateTime for="contactUpdated" type="both" />
-               </h:outputText>
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="isOwnContact" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
-
-               <h:outputText id="isOwnContact" styleClass="table_data_field" value="#{beanHelper.contact.isOwnContact()}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactPersonalTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
-
-               <h:outputText id="contactPersonalTitle" styleClass="table_data_field" value="#{msg[beanHelper.contact.contactPersonalTitle.messageKey]}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ACADEMIC_TITLE}" />
-
-               <h:outputText id="contactTitle" styleClass="table_data_field" value="#{beanHelper.contact.contactTitle}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
-
-               <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{beanHelper.contact.contactFirstName}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
-
-               <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{beanHelper.contact.contactFamilyName}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactStreet" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_STREET}" />
-
-               <h:outputText id="contactStreet" styleClass="table_data_field" value="#{beanHelper.contact.contactStreet}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactHouseNumber" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
-
-               <h:outputText id="contactHouseNumber" styleClass="table_data_field" value="#{beanHelper.contact.contactHouseNumber}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactHouseNumberExtension" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER_EXTENSION}" />
-
-               <h:outputText id="contactHouseNumberExtension" styleClass="table_data_field" value="#{beanHelper.contact.contactHouseNumberExtension}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactCountry" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_COUNTRY_CODE}" />
-
-               <h:outputText id="contactCountry" styleClass="table_data_field" value="#{beanHelper.contact.contactCountry.countryCode}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactZipCode" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
-
-               <h:outputText id="contactZipCode" styleClass="table_data_field" value="#{beanHelper.contact.contactZipCode}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactCity" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_CITY}" />
-
-               <h:outputText id="contactCity" styleClass="table_data_field" value="#{beanHelper.contact.contactCity}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
-
-               <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">
-                       <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />
-               </h:outputLink>
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactBirthday" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
-
-               <h:outputText id="contactBirthday" styleClass="table_data_field" value="#{beanHelper.contact.contactBirthday.time}">
-                       <f:convertDateTime for="contactBirthday" type="date" />
-               </h:outputText>
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactComment" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_COMMENT}" />
-
-               <h:outputText id="contactComment" styleClass="table_data_field" value="#{beanHelper.contact.contactComment}" />
-       </h:column>
-</ui:composition>
diff --git a/web/WEB-INF/templates/admin/contact/admin_contact_data_columns_mini.tpl b/web/WEB-INF/templates/admin/contact/admin_contact_data_columns_mini.tpl
deleted file mode 100644 (file)
index 61e914a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!-- @TODO maybe later add phone numbers as "main" numbers? //-->
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
-
-
-       <h:column>
-               <h:outputLabel for="contactPersonalTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
-
-               <h:outputText id="contactPersonalTitle" styleClass="table_data_field" value="#{msg[beanHelper.contact.contactPersonalTitle.messageKey]}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ACADEMIC_TITLE}" />
-
-               <h:outputText id="contactTitle" styleClass="table_data_field" value="#{beanHelper.contact.contactTitle}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
-
-               <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{beanHelper.contact.contactFirstName}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
-
-               <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{beanHelper.contact.contactFamilyName}" />
-       </h:column>
-
-       <h:column>
-               <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
-
-               <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">
-                       <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />
-               </h:outputLink>
-       </h:column>
-</ui:composition>
index ddc82a43a53c05f229b9be121574c22f0a50bde6..dd1aea7f97a5e57250a767940847e325292a8dcb 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
                                <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND}" />
                        </legend>
 
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="personalTitle" value="#{msg.ADMIN_PERSONAL_DATA_PERSONAL_TITLE}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <ui:include src="/WEB-INF/templates/selection_boxes/personal_title_selection_box.tpl">
-                                               <ui:param name="targetController" value="#{adminContactController}" />
-                                               <ui:param name="allowEmptyRequiredData" value="#{allowEmptyRequiredData}" rendered="#{not empty allowEmptyRequiredData}" />
-                                       </ui:include>
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
-
-                       <h:panelGroup styleClass="error_container" layout="block">
-                               <h:message for="personalTitle" errorClass="errors" fatalClass="errors" warnClass="errors" />
-                       </h:panelGroup>
+                       <widgets:outputPersonalTitleTableRow targetController="#{adminContactController}" allowEmptyRequiredData="#{allowEmptyRequiredData}" />
 
                        <h:panelGroup styleClass="table_row" layout="block">
                                <div class="table_left_medium">
                                <div class="clear"></div>
                        </h:panelGroup>
 
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="mobileNumber" value="#{msg.ADMIN_PERSONAL_DATA_MOBILE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <ui:include src="/WEB-INF/templates/selection_boxes/mobile_selection_box.tpl">
-                                               <ui:param name="targetController" value="#{adminContactController}" />
-                                       </ui:include>
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
+                       <widgets:outputMobileNumberTableRow targetController="#{adminContactController}" labelMessage="#{msg.ADMIN_PERSONAL_DATA_MOBILE_NUMBER}" />
 
                        <h:panelGroup styleClass="table_row" layout="block">
                                <div class="table_left_medium">
index 774bcff897e569e3c60e7438a007a4baf86c90c3..5fb4f0c716191a4245f1e966c0cfc68c1b633449 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
@@ -12,6 +13,6 @@
                        </h:outputFormat>
                </f:facet>
 
-               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_columns.tpl" />
+               <widgets:outputContactDataGridColumns />
        </h:panelGrid>
 </ui:composition>
index ec1e8c0af8d760ec75a7e9c0893abfc19607f2b6..2e62ae93bfb3b60c2f7c665c74f4b9dd9f8b90d5 100644 (file)
                                <h:outputText value="#{msg.ADMIN_OR_ENTER_CONTACT_NEW_MOBILE_DATA}" />
                        </div>
 
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="mobileNumber" value="#{msg.ADMIN_PERSONAL_DATA_MOBILE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <ui:include src="/WEB-INF/templates/input_fields/mobile_input_fields.tpl">
-                                               <ui:param name="targetController" value="#{adminPhoneController}" />
-                                       </ui:include>
-                               </div>
-                       </h:panelGroup>
+                       <widgets:outputMobileNumberTableRow targetController="#{adminPhoneController}" labelMessage="#{msg.ADMIN_PERSONAL_DATA_MOBILE_NUMBER}" />
 
                        <div class="table_footer">
                                <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
index 53c83f28917cc8de0982312312b7a8df65e578e1..5eda467a0a6c92449b2006e93cbec65fabbbe11b 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
@@ -69,6 +70,6 @@
                        <h:outputText id="userLastLockedReason" styleClass="table_data_field" value="#{beanHelper.user.userLastLockedReason}" />
                </h:column>
 
-               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_columns.tpl" />
+               <widgets:outputContactDataGridColumns />
        </h:panelGrid>
 </ui:composition>
index c3a137cd139957b42eeef68ea9a124b91a39aac9..9748ffefac2d0851df7dc64c32b9d0d3cf78dd8b 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
@@ -45,6 +46,6 @@
                        <h:outputText id="userAccountStatus" styleClass="table_data_field #{beanHelper.user.userAccountStatus.styleClass}" value="#{msg[beanHelper.user.userAccountStatus.messageKey]}" />
                </h:column>
 
-               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_columns_mini.tpl" />
+               <widgets:outputContactDataGridColumns />
        </h:panelGrid>
 </ui:composition>
index 70d24b8d5f1c1f4aa7c30035e97154e61398eef9..31a17db3fb7a67ed276d0a5a76d8ab4e67fee8ce 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                                <h:outputText value="#{msg.PERSONAL_DATA_LEGEND}" />
                        </legend>
 
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="personalTitle" value="#{msg.PERSONAL_DATA_PERSONAL_TITLE}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <ui:include src="/WEB-INF/templates/selection_boxes/personal_title_selection_box.tpl">
-                                               <ui:param  name="targetController" value="#{contactController}" />
-                                       </ui:include>
-                               </div>
-
-                               <div class="clear"></div>
-
-                               <h:panelGroup styleClass="error_container" layout="block">
-                                       <h:message for="personalTitle" errorClass="errors" fatalClass="errors" warnClass="errors" />
-                               </h:panelGroup>
-                       </h:panelGroup>
+                       <widgets:outputPersonalTitleTableRow targetController="#{contactController}" />
 
                        <h:panelGroup styleClass="table_row" layout="block">
                                <div class="table_left_medium">
                                <h:message for="faxNumber" errorClass="errors" fatalClass="errors" warnClass="errors" />
                        </h:panelGroup>
 
-                       <h:panelGroup styleClass="table_row" layout="block">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="mobileNumber" value="#{msg.PERSONAL_DATA_MOBILE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <ui:include src="/WEB-INF/templates/selection_boxes/mobile_selection_box.tpl">
-                                               <ui:param name="targetController" value="#{adminContactController}" />
-                                       </ui:include>
-                               </div>
-
-                               <div class="clear"></div>
-                       </h:panelGroup>
+                       <widgets:outputMobileNumberTableRow targetController="#{contactController}" labelMessage="#{msg.PERSONAL_DATA_MOBILE_NUMBER}" />
                </fieldset>
        </div>
 
                                        <h:outputText value="#{msg.USER_PROFILE_LEGEND}" />
                                </legend>
 
-                               <h:panelGroup styleClass="table_row" layout="block">
-                                       <div class="table_left_medium">
-                                               <h:outputLabel for="profileMode" value="#{msg.USER_PROFILE_MODE}" />
-                                       </div>
-
-                                       <div class="table_right_medium">
-                                               <ui:include src="/WEB-INF/templates/selection_boxes/profile_mode_selection_box.tpl" />
-                                       </div>
-
-                                       <div class="clear"></div>
-                               </h:panelGroup>
+                               <widgets:outputProfileModeTableRow targetController="#{userController}" labelMessage="#{msg.USER_PROFILE_MODE}" />
 
                                <h:panelGroup styleClass="table_row" layout="block">
                                        <div class="para notice">
index 6310e131949a8f456bb2f310a622aa7c4813a5cd..160774092da8db61f026c2b919790f012f3e034f 100644 (file)
@@ -18,6 +18,6 @@
        </ui:define>
 
        <ui:define name="footer">
-               <ui:include id="footer" src="/WEB-INF/templates/guest/guest_footer.tpl" />
+               <ui:include src="/WEB-INF/templates/guest/guest_footer.tpl" />
        </ui:define>
 </ui:composition>
diff --git a/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl b/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl
deleted file mode 100644 (file)
index 5e4449b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
-
-       <widgets:outputMessageBoxMini message="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" styleClass="errors" rendered="#{empty targetController}" />
-
-       <ui:fragment rendered="#{not empty targetController}">
-               <ui:include src="/WEB-INF/templates/selection_boxes/mobile_selection_box.tpl">
-                       <ui:param name="targetController" value="#{targetController}" />
-               </ui:include>
-       </ui:fragment>
-</ui:composition>
index ab40468a693a775cfdf76d1d1bf024c33038dcd0..db2d06759bc508d3e80264ba8f78dc9a7da7cfcb 100644 (file)
                <widgets:outputMessageBoxMini message="#{msg.USER_NOT_LOGGED_IN}" styleClass="errors" rendered="#{not userLoginController.isUserLoggedIn()}" />
 
                <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
-                       <ui:include id="menu" src="/WEB-INF/templates/login/user/user_menu.tpl" />
+                       <ui:include src="/WEB-INF/templates/login/user/user_menu.tpl" />
                </ui:fragment>
        </ui:define>
 
        <ui:define name="footer">
                <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
-                       <ui:include id="footer" src="/WEB-INF/templates/login/user/user_footer.tpl" />
+                       <ui:include src="/WEB-INF/templates/login/user/user_footer.tpl" />
                </ui:fragment>
        </ui:define>
 </ui:composition>
diff --git a/web/WEB-INF/templates/selection_boxes/mobile_selection_box.tpl b/web/WEB-INF/templates/selection_boxes/mobile_selection_box.tpl
deleted file mode 100644 (file)
index 8feffcf..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
-
-       <widgets:outputMessageBoxMini message="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" styleClass="errors" rendered="#{empty targetController}" />
-
-       <ui:fragment rendered="#{not empty targetController}">
-               <h:selectOneMenu styleClass="select" id="mobileProvider" value="#{targetController.mobileProvider}">
-                       <f:converter converterId="MobileProviderConverter" />
-                       <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                       <f:selectItems value="#{mobileProviderController.allMobileProviders()}" var="mobileProvider" itemValue="#{mobileProvider}" itemLabel="#{mobileProvider.providerCountry.countryExternalDialPrefix}#{mobileProvider.providerDialPrefix} (#{mobileProvider.providerName})" />
-               </h:selectOneMenu>
-
-               <h:inputText styleClass="input" id="mobileNumber" size="10" maxlength="20" value="#{targetController.mobileNumber}">
-                       <f:validator for="mobileNumber" validatorId="PhoneNumberValidator" />
-               </h:inputText>
-       </ui:fragment>
-</ui:composition>
diff --git a/web/WEB-INF/templates/selection_boxes/personal_title_selection_box.tpl b/web/WEB-INF/templates/selection_boxes/personal_title_selection_box.tpl
deleted file mode 100644 (file)
index 3c59718..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:widgets="http://mxchange.org/jsf/core/widgets"
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
-
-       <widgets:outputMessageBoxMini message="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" styleClass="errors" rendered="#{empty targetController}" />
-
-       <ui:fragment rendered="#{not empty targetController}">
-               <h:selectOneMenu styleClass="select" id="personalTitle" value="#{targetController.personalTitle}" required="#{featureController.isFeatureEnabled(targetController.controllerType.concat('_personal_title'))}" requiredMessage="#{msg.FIELD_PERSONAL_TITLE_REQUIRED}">
-                       <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" noSelectionOption="true" />
-                       <f:selectItems value="#{genderController.selectableGenders}" var="personalTitle" itemValue="#{personalTitle}" itemLabel="#{msg[personalTitle.messageKey]}" />
-               </h:selectOneMenu>
-       </ui:fragment>
-</ui:composition>
diff --git a/web/WEB-INF/templates/selection_boxes/profile_mode_selection_box.tpl b/web/WEB-INF/templates/selection_boxes/profile_mode_selection_box.tpl
deleted file mode 100644 (file)
index 680c63e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:f="http://java.sun.com/jsf/core"
-       xmlns:h="http://java.sun.com/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
-
-       <h:selectOneMenu styleClass="select" id="profileMode" value="#{userController.userProfileMode}">
-               <f:selectItems value="#{profileModeController.allProfileModes}" var="mode" itemValue="#{mode}" itemLabel="#{msg[mode.messageKey]}" />
-       </h:selectOneMenu>
-</ui:composition>
index 6a3d1ef6a3f0a629bb6f12075505510773919431..7d980f42c1ab41be397830590aaaead8f8bbdaaf 100644 (file)
@@ -5,7 +5,7 @@
     <context-param>
         <description>Generic custom JSF tags library</description>
         <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
-        <param-value>/WEB-INF/generic.jsf.taglib.xml</param-value>
+        <param-value>/WEB-INF/widgets.jsf.taglib.xml</param-value>
     </context-param>
     <context-param>
         <description>Project stage</description>
diff --git a/web/WEB-INF/widgets.jsf.taglib.xml b/web/WEB-INF/widgets.jsf.taglib.xml
new file mode 100644 (file)
index 0000000..61d3769
--- /dev/null
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (C) 2017 Roland Häder
+
+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/>.
+-->
+<facelet-taglib version="2.2"
+                               xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                               xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd">
+       <namespace>http://mxchange.org/jsf/core/widgets</namespace>
+       <tag>
+               <tag-name>outputMessageBox</tag-name>
+               <description>This tag renders a style-able and customizable message for any kind of messages that the user should see.</description>
+               <source>resources/tags/messages/message_box.tpl</source>
+               <attribute>
+                       <name>message</name>
+                       <description>The message that should be place into the message box. You may also use EL code here that resolves to a message string.</description>
+                       <required>true</required>
+                       <type>java.lang.String</type>
+               </attribute>
+               <attribute>
+                       <name>rendered</name>
+                       <description>Whether this tag is being rendered by JSF engine.</description>
+                       <required>false</required>
+                       <type>java.lang.Boolean</type>
+               </attribute>
+               <attribute>
+                       <name>styleClass</name>
+                       <description>The optional CSS style class to be forwarded on the h:outputText's styleClass attribute of the message. The default is "okay" which normally renders as a green colored message.</description>
+                       <required>false</required>
+                       <type>java.lang.String</type>
+               </attribute>
+       </tag>
+       <tag>
+               <tag-name>outputMessageBoxMini</tag-name>
+               <description>This tag renders a style-able and customizable mini message for any kind of messages that the user should see. It is similar to outputMessageBox tag but it renders a smaller box instead.</description>
+               <source>resources/tags/messages/message_box_mini.tpl</source>
+               <attribute>
+                       <name>message</name>
+                       <description>The message that should be place into the message box. You may also use EL code here that resolves to a message string.</description>
+                       <required>true</required>
+                       <type>java.lang.String</type>
+               </attribute>
+               <attribute>
+                       <name>rendered</name>
+                       <description>Whether this tag is being rendered by JSF engine.</description>
+                       <required>false</required>
+                       <type>java.lang.Boolean</type>
+               </attribute>
+               <attribute>
+                       <name>styleClass</name>
+                       <description>The optional CSS style class to be forwarded on the h:outputText's styleClass attribute of the message. The default is "okay" which normally renders as a green colored message.</description>
+                       <required>false</required>
+                       <type>java.lang.String</type>
+               </attribute>
+       </tag>
+       <tag>
+               <tag-name>outputContactDataGridColumns</tag-name>
+               <description>This tag renders columns for displaying contact data for administrative views.</description>
+               <source>resources/tags/admin/columns/admin_contact_data_columns.tpl</source>
+       </tag>
+       <tag>
+               <tag-name>outputPersonalTitleTableRow</tag-name>
+               <description>This tag renders a selection box for user contact's personal title (Mr./Mrs.).</description>
+               <source>resources/tags/table_rows/user_personal_title_table_row.tpl</source>
+               <attribute>
+                       <name>allowEmptyRequiredData</name>
+                       <description>Whether allow the personal title to be left empty. This might be the case when you create a user and want to select a contact from a selection box. EL code resolving to a boolean may be allowed here.</description>
+                       <required>false</required>
+                       <type>java.lang.Boolean</type>
+               </attribute>
+               <attribute>
+                       <name>rendered</name>
+                       <description>Whether this tag is being rendered by JSF engine.</description>
+                       <required>false</required>
+                       <type>java.lang.Boolean</type>
+               </attribute>
+               <attribute>
+                       <name>targetController</name>
+                       <description>A target backing bean (EL code resolving into it) extending at least BaseFacesBean where to set the data in.</description>
+                       <required>true</required>
+                       <!-- @TODO Find an interface for BaseFacesBean and set it here instead -->
+                       <type>org.mxchange.jcoreee.bean.faces.BaseFacesBean</type>
+               </attribute>
+       </tag>
+       <tag>
+               <tag-name>outputMobileNumberTableRow</tag-name>
+               <description>This tag renders a selection box for contact's personal title (Mr./Mrs.).</description>
+               <source>resources/tags/table_rows/mobile_selection_table_row.tpl</source>
+               <attribute>
+                       <name>labelMessage</name>
+                       <description>A localized message for the rendered label tag. You should use EL code here to add a label message from your bundle.</description>
+                       <required>true</required>
+                       <!-- @TODO Find an interface for BaseFacesBean and set it here instead -->
+                       <type>org.mxchange.jcoreee.bean.faces.BaseFacesBean</type>
+               </attribute>
+               <attribute>
+                       <name>rendered</name>
+                       <description>Whether this tag is being rendered by JSF engine.</description>
+                       <required>false</required>
+                       <type>java.lang.Boolean</type>
+               </attribute>
+               <attribute>
+                       <name>targetController</name>
+                       <description>A target backing bean (EL code resolving into it) extending at least BaseFacesBean where to set the data in.</description>
+                       <required>true</required>
+                       <!-- @TODO Find an interface for BaseFacesBean and set it here instead -->
+                       <type>org.mxchange.jcoreee.bean.faces.BaseFacesBean</type>
+               </attribute>
+       </tag>
+       <tag>
+               <tag-name>outputProfileModeTableRow</tag-name>
+               <description>This tag renders a selection box for user's profile mode.</description>
+               <source>resources/tags/table_rows/user_profile_mode_table_row.tpl</source>
+               <attribute>
+                       <name>labelMessage</name>
+                       <description>A localized message for the rendered label tag. You should use EL code here to add a label message from your bundle.</description>
+                       <required>true</required>
+                       <!-- @TODO Find an interface for BaseFacesBean and set it here instead -->
+                       <type>org.mxchange.jcoreee.bean.faces.BaseFacesBean</type>
+               </attribute>
+               <attribute>
+                       <name>rendered</name>
+                       <description>Whether this tag is being rendered by JSF engine.</description>
+                       <required>false</required>
+                       <type>java.lang.Boolean</type>
+               </attribute>
+               <attribute>
+                       <name>targetController</name>
+                       <description>A target backing bean (EL code resolving into it) extending at least BaseFacesBean where to set the data in.</description>
+                       <required>true</required>
+                       <!-- @TODO Find an interface for BaseFacesBean and set it here instead -->
+                       <type>org.mxchange.jcoreee.bean.faces.BaseFacesBean</type>
+               </attribute>
+       </tag>
+</facelet-taglib>
index fb18d2f668903c3397967bff12f8db29413fcb84..03674f1ce46f4b8b5d0694d7c8b9dcdbe301e6e8 100644 (file)
@@ -55,7 +55,7 @@
                </h:panelGroup>
 
                <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
-                       <ui:include id="login_only" src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
+                       <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
                </ui:fragment>
        </ui:define>
 </ui:composition>