From: Roland Häder <roland@mxchange.org> Date: Sun, 20 Aug 2017 18:29:37 +0000 (+0200) Subject: MOJARRA - Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b9afa08ce1806a18dddb26788a12d61f1b881edc;p=jfinancials-war.git MOJARRA - Please cherry-pick: - introduced own (still project-local) taglib for message template replacement - now this is much shorter, down to only one JSF tag instead of 2-3 minimum Signed-off-by: Roland Häder <roland@mxchange.org> --- diff --git a/web/WEB-INF/generic.jsf.taglib.xml b/web/WEB-INF/generic.jsf.taglib.xml new file mode 100644 index 00000000..68ac2a69 --- /dev/null +++ b/web/WEB-INF/generic.jsf.taglib.xml @@ -0,0 +1,57 @@ +<?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</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/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/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/generic/messages/message_box.tpl b/web/WEB-INF/resources/tags/generic/messages/message_box.tpl new file mode 100644 index 00000000..c32fdf7b --- /dev/null +++ b/web/WEB-INF/resources/tags/generic/messages/message_box.tpl @@ -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"> + + <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 new file mode 100644 index 00000000..35cd54ad --- /dev/null +++ b/web/WEB-INF/resources/tags/generic/messages/message_box_mini.tpl @@ -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"> + + <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/templates/admin/business_basic_data/admin_form_business_basic_data.tpl b/web/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl index 1e5f856d..39a99437 100644 --- a/web/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl +++ b/web/WEB-INF/templates/admin/business_basic_data/admin_form_business_basic_data.tpl @@ -35,7 +35,7 @@ <div class="table_right_medium"> <h:inputText styleClass="input" id="companyEmailAddress" size="20" maxlength="255" value="#{adminBusinessDataController.companyEmailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"> <f:validator validatorId="EmailAddressValidator" /> - <f:attribute name="allowEmpty" value="true" /> + <f:attribute name="allowEmptyEmail" value="true" /> </h:inputText> </div> diff --git a/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl b/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl index 1fc03955..b172a81f 100644 --- a/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl +++ b/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:panelGroup styleClass="table" layout="block" rendered="#{not empty beanHelper.contact}"> <div class="table_header"> diff --git a/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl index 8ee9b405..ddc82a43 100644 --- a/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl +++ b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl @@ -6,6 +6,9 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> <div class="para"> + <h:outputText value="#{allowEmptyRequiredData}" rendered="#{not empty allowEmptyRequiredData}" /> + <h:outputText value="allowEmptyRequiredData is empty" rendered="#{empty allowEmptyRequiredData}" /> + <fieldset class="fieldset" id="personal_data"> <legend title="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_DATA_LEGEND}" /> @@ -19,6 +22,7 @@ <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> @@ -251,6 +255,7 @@ <div class="table_right_medium"> <h:inputText styleClass="input" id="emailAddress" size="10" maxlength="255" value="#{adminContactController.emailAddress}" validatorMessage="#{msg.ENTERED_EMAIL_ADDRESS_IS_INVALID}"> <f:validator validatorId="EmailAddressValidator" /> + <f:attribute name="allowEmptyEmail" value="#{allowEmptyRequiredData}" rendered="#{not empty allowEmptyRequiredData}" /> </h:inputText> </div> diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl index e3cc014a..b1e06064 100644 --- a/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <ui:fragment rendered="#{empty beanHelper.contact.contactFaxNumber and not empty beanHelper.contact}"> <ui:include src="/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl" /> diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl index 532ef872..1a0deff8 100644 --- a/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_fax_data.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.faxNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.faxNumber}" /> <h:panelGrid id="fax_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_FAX_NUMBER_DATA}" headerClass="table_header_column" styleClass="table_medium" columns="2" rendered="#{not empty beanHelper.faxNumber}"> <f:facet name="header"> diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl b/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl index 42e0f26d..037cac38 100644 --- a/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.faxNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.faxNumber}" /> <ui:fragment rendered="#{not empty beanHelper.faxNumber}"> <ul class="mini_nav"> diff --git a/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl b/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl index 180ad4c0..c0198241 100644 --- a/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_form_add_contact_fax.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:form id="form_add_contact_fax" rendered="#{not empty beanHelper.contact}"> <h:panelGroup styleClass="table_medium" layout="block"> diff --git a/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl b/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl index c3aa9fff..e1b74edd 100644 --- a/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl +++ b/web/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl @@ -1,56 +1,54 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.faxNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.faxNumber}" /> + + <ui:fragment rendered="#{not empty beanHelper.faxNumber}"> + <div class="para"> + <fieldset class="fieldset" id="fax_data"> + <legend title="#{msg.ADMIN_FAX_NUMBER_DATA_LEGEND_TITLE}"> + <h:outputText value="#{msg.ADMIN_FAX_NUMBER_DATA_LEGEND}" /> + </legend> + + <h:panelGroup styleClass="table_row" layout="block"> + <div class="table_left_medium"> + <h:outputLabel for="faxNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" /> + </div> + + <div class="table_right_medium"> + <h:outputText id="faxNumberId" value="#{beanHelper.faxNumber.phoneId}" /> + </div> + + <div class="clear"></div> + </h:panelGroup> + + <h:panelGroup styleClass="table_row" layout="block"> + <div class="table_left_medium"> + <h:outputLabel for="faxNumber" value="#{msg.ADMIN_EDIT_FAX_NUMBER}" /> + </div> + + <div class="table_right_medium"> + <ui:include src="/WEB-INF/templates/input_fields/fax_input_fields.tpl"> + <ui:param name="targetController" value="#{adminPhoneController}" /> + </ui:include> + </div> + + <div class="clear"></div> + </h:panelGroup> + + <h:panelGroup styleClass="error_container" layout="block"> + <h:message for="faxAreaCode" errorClass="errors" fatalClass="errors" warnClass="errors" /> + </h:panelGroup> + + <h:panelGroup styleClass="error_container" layout="block"> + <h:message for="faxNumber" errorClass="errors" fatalClass="errors" warnClass="errors" /> + </h:panelGroup> + </fieldset> + </div> </ui:fragment> - - <div class="para"> - <fieldset class="fieldset" id="fax_data"> - <legend title="#{msg.ADMIN_FAX_NUMBER_DATA_LEGEND_TITLE}"> - <h:outputText value="#{msg.ADMIN_FAX_NUMBER_DATA_LEGEND}" /> - </legend> - - <h:panelGroup styleClass="table_row" layout="block"> - <div class="table_left_medium"> - <h:outputLabel for="faxNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" /> - </div> - - <div class="table_right_medium"> - <h:outputText id="faxNumberId" value="#{beanHelper.faxNumber.phoneId}" /> - </div> - - <div class="clear"></div> - </h:panelGroup> - - <h:panelGroup styleClass="table_row" layout="block"> - <div class="table_left_medium"> - <h:outputLabel for="faxNumber" value="#{msg.ADMIN_EDIT_FAX_NUMBER}" /> - </div> - - <div class="table_right_medium"> - <ui:include src="/WEB-INF/templates/input_fields/fax_input_fields.tpl"> - <ui:param name="targetController" value="#{adminPhoneController}" /> - </ui:include> - </div> - - <div class="clear"></div> - </h:panelGroup> - - <h:panelGroup styleClass="error_container" layout="block"> - <h:message for="faxAreaCode" errorClass="errors" fatalClass="errors" warnClass="errors" /> - </h:panelGroup> - - <h:panelGroup styleClass="error_container" layout="block"> - <h:message for="faxNumber" errorClass="errors" fatalClass="errors" warnClass="errors" /> - </h:panelGroup> - </fieldset> - </div> </ui:composition> diff --git a/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl b/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl index d81e62cc..272ab53c 100644 --- a/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl +++ b/web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:form id="form_add_contact_landline" rendered="#{not empty beanHelper.contact}"> <h:panelGroup styleClass="table_medium" layout="block"> diff --git a/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl b/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl index 52cc1c22..f10df164 100644 --- a/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl +++ b/web/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl @@ -1,56 +1,54 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.landLineNumber}" /> + + <ui:fragment rendered="#{not empty beanHelper.landLineNumber}"> + <div class="para"> + <fieldset class="fieldset" id="landline_data"> + <legend title="#{msg.ADMIN_LAND_LINE_NUMBER_DATA_LEGEND_TITLE}"> + <h:outputText value="#{msg.ADMIN_LAND_LINE_NUMBER_DATA_LEGEND}" /> + </legend> + + <h:panelGroup styleClass="table_row" layout="block"> + <div class="table_left_medium"> + <h:outputLabel for="landLineNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" /> + </div> + + <div class="table_right_medium"> + <h:outputText id="landLineNumberId" value="#{beanHelper.landLineNumber.phoneId}" /> + </div> + + <div class="clear"></div> + </h:panelGroup> + + <h:panelGroup styleClass="table_row" layout="block"> + <div class="table_left_medium"> + <h:outputLabel for="landLineNumber" value="#{msg.ADMIN_EDIT_LAND_LINE_NUMBER}" /> + </div> + + <div class="table_right_medium"> + <ui:include src="/WEB-INF/templates/input_fields/landline_input_fields.tpl"> + <ui:param name="targetController" value="#{adminPhoneController}" /> + </ui:include> + </div> + + <div class="clear"></div> + </h:panelGroup> + + <h:panelGroup styleClass="error_container" layout="block"> + <h:message for="landLineAreaCode" errorClass="errors" fatalClass="errors" warnClass="errors" /> + </h:panelGroup> + + <h:panelGroup styleClass="error_container" layout="block"> + <h:message for="landLineNumber" errorClass="errors" fatalClass="errors" warnClass="errors" /> + </h:panelGroup> + </fieldset> + </div> </ui:fragment> - - <div class="para"> - <fieldset class="fieldset" id="landline_data"> - <legend title="#{msg.ADMIN_LAND_LINE_NUMBER_DATA_LEGEND_TITLE}"> - <h:outputText value="#{msg.ADMIN_LAND_LINE_NUMBER_DATA_LEGEND}" /> - </legend> - - <h:panelGroup styleClass="table_row" layout="block"> - <div class="table_left_medium"> - <h:outputLabel for="landLineNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" /> - </div> - - <div class="table_right_medium"> - <h:outputText id="landLineNumberId" value="#{beanHelper.landLineNumber.phoneId}" /> - </div> - - <div class="clear"></div> - </h:panelGroup> - - <h:panelGroup styleClass="table_row" layout="block"> - <div class="table_left_medium"> - <h:outputLabel for="landLineNumber" value="#{msg.ADMIN_EDIT_LAND_LINE_NUMBER}" /> - </div> - - <div class="table_right_medium"> - <ui:include src="/WEB-INF/templates/input_fields/landline_input_fields.tpl"> - <ui:param name="targetController" value="#{adminPhoneController}" /> - </ui:include> - </div> - - <div class="clear"></div> - </h:panelGroup> - - <h:panelGroup styleClass="error_container" layout="block"> - <h:message for="landLineAreaCode" errorClass="errors" fatalClass="errors" warnClass="errors" /> - </h:panelGroup> - - <h:panelGroup styleClass="error_container" layout="block"> - <h:message for="landLineNumber" errorClass="errors" fatalClass="errors" warnClass="errors" /> - </h:panelGroup> - </fieldset> - </div> </ui:composition> diff --git a/web/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl b/web/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl index 82b3ecf4..ca57e430 100644 --- a/web/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl +++ b/web/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <ui:fragment rendered="#{empty beanHelper.contact.contactLandLineNumber and not empty beanHelper.contact}"> <ui:include src="/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl" /> diff --git a/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl b/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl index 4e8b11b6..8a905c2c 100644 --- a/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl +++ b/web/WEB-INF/templates/admin/landline/admin_landline_data.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.landLineNumber}" /> <h:panelGrid id="landline_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_LAND_LINE_NUMBER_DATA}" headerClass="table_header_column" styleClass="table_medium" columns="2" rendered="#{not empty beanHelper.landLineNumber}"> <f:facet name="header"> diff --git a/web/WEB-INF/templates/admin/landline/admin_landline_links.tpl b/web/WEB-INF/templates/admin/landline/admin_landline_links.tpl index 25b36dd3..aa6a44e6 100644 --- a/web/WEB-INF/templates/admin/landline/admin_landline_links.tpl +++ b/web/WEB-INF/templates/admin/landline/admin_landline_links.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.landLineNumber}" /> <ui:fragment rendered="#{not empty beanHelper.landLineNumber}"> <ul class="mini_nav"> diff --git a/web/WEB-INF/templates/admin/mobile/admin_form_add_contact_mobile.tpl b/web/WEB-INF/templates/admin/mobile/admin_form_add_contact_mobile.tpl index b4892289..036ba693 100644 --- a/web/WEB-INF/templates/admin/mobile/admin_form_add_contact_mobile.tpl +++ b/web/WEB-INF/templates/admin/mobile/admin_form_add_contact_mobile.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:form id="form_add_contact_mobile" rendered="#{not empty beanHelper.contact}"> <h:panelGroup styleClass="table_medium" layout="block"> diff --git a/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl b/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl index 9f56cfa1..54898df3 100644 --- a/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl +++ b/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl @@ -1,72 +1,70 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.mobileNumber}" /> - <div class="para"> - <fieldset class="fieldset" id="mobile_data"> - <legend title="#{msg.ADMIN_MOBILE_NUMBER_DATA_LEGEND_TITLE}"> - <h:outputText value="#{msg.ADMIN_MOBILE_NUMBER_DATA_LEGEND}" /> - </legend> + <ui:fragment rendered="#{not empty beanHelper.mobileNumber}"> + <div class="para"> + <fieldset class="fieldset" id="mobile_data"> + <legend title="#{msg.ADMIN_MOBILE_NUMBER_DATA_LEGEND_TITLE}"> + <h:outputText value="#{msg.ADMIN_MOBILE_NUMBER_DATA_LEGEND}" /> + </legend> - <h:panelGroup styleClass="table_row" layout="block"> - <div class="table_left_medium"> - <h:outputLabel for="mobileNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" /> - </div> + <h:panelGroup styleClass="table_row" layout="block"> + <div class="table_left_medium"> + <h:outputLabel for="mobileNumberId" value="#{msg.ADMIN_SHOW_PHONE_ID}" /> + </div> - <div class="table_right_medium"> - <h:outputText id="mobileNumberId" value="#{beanHelper.mobileNumber.phoneId}" /> - </div> + <div class="table_right_medium"> + <h:outputText id="mobileNumberId" value="#{beanHelper.mobileNumber.phoneId}" /> + </div> - <div class="clear"></div> - </h:panelGroup> + <div class="clear"></div> + </h:panelGroup> - <h:panelGroup styleClass="table_row" layout="block"> - <div class="table_left_medium"> - <h:outputLabel for="mobileProvider" value="#{msg.ADMIN_EDIT_MOBILE_PROVIDER}" /> - </div> + <h:panelGroup styleClass="table_row" layout="block"> + <div class="table_left_medium"> + <h:outputLabel for="mobileProvider" value="#{msg.ADMIN_EDIT_MOBILE_PROVIDER}" /> + </div> - <div class="table_right_medium"> - <h:selectOneMenu styleClass="select" id="mobileProvider" value="#{adminPhoneController.mobileProvider}" required="true" requiredMessage="#{msg.ADMIN_MOBILE_PROVIDER_REQUIRED}"> - <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> - </div> + <div class="table_right_medium"> + <h:selectOneMenu styleClass="select" id="mobileProvider" value="#{adminPhoneController.mobileProvider}" required="true" requiredMessage="#{msg.ADMIN_MOBILE_PROVIDER_REQUIRED}"> + <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> + </div> - <div class="clear"></div> + <div class="clear"></div> - <h:panelGroup styleClass="error_container" layout="block"> - <h:message for="mobileProvider" errorClass="errors" fatalClass="errors" warnClass="errors" /> + <h:panelGroup styleClass="error_container" layout="block"> + <h:message for="mobileProvider" errorClass="errors" fatalClass="errors" warnClass="errors" /> + </h:panelGroup> </h:panelGroup> - </h:panelGroup> - <h:panelGroup styleClass="table_row" layout="block"> - <div class="table_left_medium"> - <h:outputLabel for="mobileNumber" value="#{msg.ADMIN_EDIT_MOBILE_NUMBER}" /> - </div> + <h:panelGroup styleClass="table_row" layout="block"> + <div class="table_left_medium"> + <h:outputLabel for="mobileNumber" value="#{msg.ADMIN_EDIT_MOBILE_NUMBER}" /> + </div> - <div class="table_right_medium"> - <h:inputText styleClass="input" id="mobileNumber" size="10" maxlength="20" value="#{adminPhoneController.phoneNumber}" required="true" requiredMessage="#{msg.ADMIN_MOBILE_NUMBER_REQUIRED}"> - <f:validator for="mobileNumber" validatorId="PhoneNumberValidator" /> - </h:inputText> - </div> + <div class="table_right_medium"> + <h:inputText styleClass="input" id="mobileNumber" size="10" maxlength="20" value="#{adminPhoneController.phoneNumber}" required="true" requiredMessage="#{msg.ADMIN_MOBILE_NUMBER_REQUIRED}"> + <f:validator for="mobileNumber" validatorId="PhoneNumberValidator" /> + </h:inputText> + </div> - <div class="clear"></div> + <div class="clear"></div> - <h:panelGroup styleClass="error_container" layout="block"> - <h:message for="mobileNumber" errorClass="errors" fatalClass="errors" warnClass="errors" /> + <h:panelGroup styleClass="error_container" layout="block"> + <h:message for="mobileNumber" errorClass="errors" fatalClass="errors" warnClass="errors" /> + </h:panelGroup> </h:panelGroup> - </h:panelGroup> - </fieldset> - </div> + </fieldset> + </div> + </ui:fragment> </ui:composition> diff --git a/web/WEB-INF/templates/admin/mobile/admin_mobile_add_show.tpl b/web/WEB-INF/templates/admin/mobile/admin_mobile_add_show.tpl index 9580d1da..2519b588 100644 --- a/web/WEB-INF/templates/admin/mobile/admin_mobile_add_show.tpl +++ b/web/WEB-INF/templates/admin/mobile/admin_mobile_add_show.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" <ui:fragment rendered="#{empty beanHelper.contact.contactMobileNumber and not empty beanHelper.contact}"> <ui:include src="/WEB-INF/templates/admin/mobile/admin_form_add_contact_mobile.tpl" /> diff --git a/web/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl b/web/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl index fbcc22db..8a022bd4 100644 --- a/web/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl +++ b/web/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.mobileNumber}" /> <h:panelGrid id="mobile_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_MOBILE_NUMBER_DATA}" headerClass="table_header_column" styleClass="table_medium" columns="2" rendered="#{not empty beanHelper.mobileNumber}"> <f:facet name="header"> diff --git a/web/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl b/web/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl index 0458bd9b..69d4688e 100644 --- a/web/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl +++ b/web/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.mobileNumber}" /> <ui:fragment rendered="#{not empty beanHelper.mobileNumber}"> <ul class="mini_nav"> diff --git a/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl b/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl index 74042e47..5f8e7edc 100644 --- a/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl +++ b/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty mode}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_USER_DATA_PASSWORD_NOTICE}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_PARAMETER_MODE_NOT_SET}" styleClass="errors" rendered="#{empty mode}" /> <ui:fragment rendered="#{not empty mode}"> <div class="para"> diff --git a/web/WEB-INF/templates/admin/user/admin_user_links.tpl b/web/WEB-INF/templates/admin/user/admin_user_links.tpl index d7c209c6..6cb6f61f 100644 --- a/web/WEB-INF/templates/admin/user/admin_user_links.tpl +++ b/web/WEB-INF/templates/admin/user/admin_user_links.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_USER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_USER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.user}" /> <h:panelGroup styleClass="table" layout="block" rendered="#{not empty beanHelper.user}"> <div class="table_header"> diff --git a/web/WEB-INF/templates/input_fields/fax_input_fields.tpl b/web/WEB-INF/templates/input_fields/fax_input_fields.tpl index 7849f34e..015ad4ca 100644 --- a/web/WEB-INF/templates/input_fields/fax_input_fields.tpl +++ b/web/WEB-INF/templates/input_fields/fax_input_fields.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty targetController}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" styleClass="errors" rendered="#{empty targetController}" /> <ui:fragment rendered="#{not empty targetController}"> <h:selectOneMenu styleClass="select right_space" id="faxCountry" value="#{targetController.faxCountry}"> diff --git a/web/WEB-INF/templates/input_fields/landline_input_fields.tpl b/web/WEB-INF/templates/input_fields/landline_input_fields.tpl index da4cb793..e80ddeff 100644 --- a/web/WEB-INF/templates/input_fields/landline_input_fields.tpl +++ b/web/WEB-INF/templates/input_fields/landline_input_fields.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty targetController}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" styleClass="errors" rendered="#{empty targetController}" /> <ui:fragment rendered="#{not empty targetController}"> <h:selectOneMenu styleClass="select right_space" id="countryPhoneCode" value="#{targetController.landLineCountry}"> diff --git a/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl b/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl index 1bfa5771..6a60fc2c 100644 --- a/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl +++ b/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl @@ -1,20 +1,16 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty targetController}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox 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="#{adminContactController}" /> + <ui:param name="targetController" value="#{targetController}" /> </ui:include> </ui:fragment> </ui:composition> diff --git a/web/WEB-INF/templates/login/user/user_base.tpl b/web/WEB-INF/templates/login/user/user_base.tpl index 00c63b1c..0b1d2110 100644 --- a/web/WEB-INF/templates/login/user/user_base.tpl +++ b/web/WEB-INF/templates/login/user/user_base.tpl @@ -2,6 +2,7 @@ <ui:composition template="/WEB-INF/templates/base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html"> @@ -14,12 +15,8 @@ </ui:define> <ui:define name="menu"> - <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> - <ui:include src="/WEB-INF/templates/messages/message_box_mini.tpl"> - <ui:param name="message" value="#{msg.USER_NOT_LOGGED_IN}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic: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:fragment> diff --git a/web/WEB-INF/templates/messages/message_box.tpl b/web/WEB-INF/templates/messages/message_box.tpl deleted file mode 100644 index 07c5b1e4..00000000 --- a/web/WEB-INF/templates/messages/message_box.tpl +++ /dev/null @@ -1,34 +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/templates/messages/message_box_mini.tpl b/web/WEB-INF/templates/messages/message_box_mini.tpl deleted file mode 100644 index e8e1c560..00000000 --- a/web/WEB-INF/templates/messages/message_box_mini.tpl +++ /dev/null @@ -1,34 +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/templates/selection_boxes/personal_title_selection_box.tpl b/web/WEB-INF/templates/selection_boxes/personal_title_selection_box.tpl index c09e757a..7e748eaa 100644 --- a/web/WEB-INF/templates/selection_boxes/personal_title_selection_box.tpl +++ b/web/WEB-INF/templates/selection_boxes/personal_title_selection_box.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty targetController}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox 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}"> diff --git a/web/WEB-INF/templates/user/user_profile_link.tpl b/web/WEB-INF/templates/user/user_profile_link.tpl index 47abe987..aa275dce 100644 --- a/web/WEB-INF/templates/user/user_profile_link.tpl +++ b/web/WEB-INF/templates/user/user_profile_link.tpl @@ -1,16 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - <ui:fragment rendered="#{empty user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_PARAMETER_USER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_PARAMETER_USER_NOT_SET}" styleClass="errors" rendered="#{empty user}" /> <h:outputText styleClass="notice" value="#{msg.USER_PROFILE_NOT_PUBLICLY_VISIBLE}" rendered="#{not empty user and not profileController.isProfileLinkVisibleByUser(user)}" /> diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml index c6c43310..24bc9644 100644 --- a/web/WEB-INF/web.xml +++ b/web/WEB-INF/web.xml @@ -3,7 +3,12 @@ <description>An application to handle all your receipts and do some calculation with it.</description> <display-name>JFinancials Application v1.0</display-name> <context-param> - <description>Project stage.</description> + <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> + </context-param> + <context-param> + <description>Project stage</description> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> diff --git a/web/admin/business_contacts/admin_business_contacts_list.xhtml b/web/admin/business_contacts/admin_business_contacts_list.xhtml index ab2de3f3..1544f835 100644 --- a/web/admin/business_contacts/admin_business_contacts_list.xhtml +++ b/web/admin/business_contacts/admin_business_contacts_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,12 +15,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{businessDataController.allBusinessContacts().isEmpty()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ADMIN_BUSINESS_BASIC_DATA_LIST_EMPTY}" styleClass="errors" rendered="#{businessDataController.allBusinessContacts().isEmpty()}" /> <h:dataTable id="table_list_business_contacts" var="businessContact" value="#{businessDataController.allBusinessContacts()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BUSINESS_BASIC_DATA}" rendered="#{not businessDataController.allBusinessContacts().isEmpty()}"> <h:column> @@ -55,9 +51,9 @@ <h:outputText value="#{msg.ADMIN_BUSINESS_BASIC_DATA_CONTACT_PERSON}" /> </f:facet> - <h:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE}" value="#{businessContact.companyContact.employeeId}" rendered="#{not empty businessContact.companyContact}" /> + <h:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE}" value="#{businessContact.companyContactEmployee.employeeId}" rendered="#{not empty businessContact.companyContactEmployee}" /> - <h:link outcome="admin_assign_business_basic_data_contact" title="#{msg.ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE}" value="#{msg[ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON]}" rendered="#{empty businessContact.companyContact}" /> + <h:link outcome="admin_assign_business_basic_data_contact" title="#{msg.ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON_TITLE}" value="#{msg[ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_CONTACT_PERSON]}" rendered="#{empty businessContact.companyContactEmployee}" /> </h:column> <h:column> diff --git a/web/admin/contact/admin_contact_delete.xhtml b/web/admin/contact/admin_contact_delete.xhtml index e334721f..7cb4a543 100644 --- a/web/admin/contact/admin_contact_delete.xhtml +++ b/web/admin/contact/admin_contact_delete.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -8,7 +9,7 @@ <ui:define name="metadata"> <f:metadata> <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" /> - <f:viewAction onPostback="true" action="#{beanHelper.copyContactToController()}" /> + <f:viewAction onPostback="true" action="#{beanHelper.notifyControllerContactConverted()}" /> </f:metadata> </ui:define> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:form id="form_admin_edit_user" rendered="#{not empty beanHelper.contact}"> <h:panelGroup styleClass="table" layout="block"> diff --git a/web/admin/contact/admin_contact_edit.xhtml b/web/admin/contact/admin_contact_edit.xhtml index 41ed4f56..c6e61f72 100644 --- a/web/admin/contact/admin_contact_edit.xhtml +++ b/web/admin/contact/admin_contact_edit.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:form id="form_admin_edit_user" rendered="#{not empty beanHelper.contact}"> <h:panelGroup styleClass="table_medium" layout="block"> diff --git a/web/admin/contact/admin_contact_export.xhtml b/web/admin/contact/admin_contact_export.xhtml index 942d4470..93075510 100644 --- a/web/admin/contact/admin_contact_export.xhtml +++ b/web/admin/contact/admin_contact_export.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" @@ -15,12 +16,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{contactController.allContacts().isEmpty()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_CONTACT_LIST_EMPTY}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ADMIN_CONTACT_LIST_EMPTY}" styleClass="errors" rendered="#{contactController.allContacts().isEmpty()}" /> <h:form id="form_export_contacts" rendered="#{not contactController.allContacts().isEmpty()}"> <p:dataTable id="table_export_contacts" var="contact" value="#{contactController.allContacts()}" tableStyleClass="table_full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_CONTACT}"> diff --git a/web/admin/contact/admin_contact_list.xhtml b/web/admin/contact/admin_contact_list.xhtml index a7a50196..22f33510 100644 --- a/web/admin/contact/admin_contact_list.xhtml +++ b/web/admin/contact/admin_contact_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,12 +15,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{contactController.allContacts().isEmpty()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_CONTACT_LIST_EMPTY}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ADMIN_CONTACT_LIST_EMPTY}" styleClass="errors" rendered="#{contactController.allContacts().isEmpty()}" /> <h:dataTable id="table_list_contacts" var="contact" value="#{contactController.allContacts()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT}" rendered="#{not contactController.allContacts().isEmpty()}"> <h:column> @@ -85,7 +81,9 @@ <h:outputText value="#{msg.ADMIN_ADD_CONTACT_MINIMUM_DATA}" /> </div> - <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl" /> + <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl"> + <ui:param name="allowEmptyRequiredData" value="true" /> + </ui:include> <div class="table_footer"> <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> diff --git a/web/admin/contact/admin_contact_show.xhtml b/web/admin/contact/admin_contact_show.xhtml index 60b6c5f3..fbf5e9ec 100644 --- a/web/admin/contact/admin_contact_show.xhtml +++ b/web/admin/contact/admin_contact_show.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <ui:fragment rendered="#{not empty beanHelper.contact}"> <ui:include src="/WEB-INF/templates/admin/contact/admin_show_contact_data.tpl" /> diff --git a/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml b/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml index 56743a07..a2a8a822 100644 --- a/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml +++ b/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -52,19 +53,9 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.faxNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.faxNumber}" /> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:outputFormat styleClass="errors" value="#{msg.ERROR_FAX_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactFaxNumber != beanHelper.faxNumber}"> <f:param value="#{adminContactPhoneController.phoneId}" /> diff --git a/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml b/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml index 906f4b9b..94c48e0f 100644 --- a/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml +++ b/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -50,19 +51,9 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.landLineNumber}" /> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:outputFormat styleClass="errors" value="#{msg.ERROR_LAND_LINE_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber != beanHelper.landLineNumber}"> <f:param value="#{beanHelper.landLineNumber.phoneId}" /> diff --git a/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml b/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml index 72ee0953..2cd08c4d 100644 --- a/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml +++ b/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -50,19 +51,9 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.mobileNumber}" /> - <ui:fragment rendered="#{empty beanHelper.contact}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.contact}" /> <h:outputFormat styleClass="errors" value="#{msg.ERROR_MOBILE_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber != beanHelper.mobileNumber}"> <f:param value="#{beanHelper.mobileNumber.phoneId}" /> diff --git a/web/admin/fax/admin_fax_delete.xhtml b/web/admin/fax/admin_fax_delete.xhtml index 6da5063c..7d5b8770 100644 --- a/web/admin/fax/admin_fax_delete.xhtml +++ b/web/admin/fax/admin_fax_delete.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -44,11 +45,6 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.faxNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.faxNumber}" /> </ui:define> </ui:composition> diff --git a/web/admin/fax/admin_fax_edit.xhtml b/web/admin/fax/admin_fax_edit.xhtml index 5cfe15ff..bfe59db3 100644 --- a/web/admin/fax/admin_fax_edit.xhtml +++ b/web/admin/fax/admin_fax_edit.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -38,11 +39,6 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.faxNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.faxNumber}" /> </ui:define> </ui:composition> diff --git a/web/admin/fax/admin_fax_list.xhtml b/web/admin/fax/admin_fax_list.xhtml index 1df83790..19288fad 100644 --- a/web/admin/fax/admin_fax_list.xhtml +++ b/web/admin/fax/admin_fax_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -54,11 +55,6 @@ </h:column> </h:dataTable> - <ui:fragment rendered="#{phoneController.allFaxNumbers().isEmpty()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_LIST_FAX_NUMBER_EMPTY}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ADMIN_LIST_FAX_NUMBER_EMPTY}" styleClass="errors" rendered="#{phoneController.allFaxNumbers().isEmpty()}" /> </ui:define> </ui:composition> diff --git a/web/admin/fax/admin_fax_show.xhtml b/web/admin/fax/admin_fax_show.xhtml index 4dccd2f3..8d736fe5 100644 --- a/web/admin/fax/admin_fax_show.xhtml +++ b/web/admin/fax/admin_fax_show.xhtml @@ -22,7 +22,7 @@ <ui:define name="content"> <ui:include src="/WEB-INF/templates/admin/fax/admin_fax_data.tpl"> - <ui:param name="isShowPage" value="#{true}" /> + <ui:param name="isShowPage" value="true" /> </ui:include> <h:dataTable id="contact_fax_link" var="contact" value="#{contactPhoneController.allCurrentFaxNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" headerClass="table_header_column" styleClass="table_medium"> diff --git a/web/admin/landline/admin_landline_delete.xhtml b/web/admin/landline/admin_landline_delete.xhtml index 486ff2d7..e20e3523 100644 --- a/web/admin/landline/admin_landline_delete.xhtml +++ b/web/admin/landline/admin_landline_delete.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -44,11 +45,6 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.landLineNumber}" /> </ui:define> </ui:composition> diff --git a/web/admin/landline/admin_landline_edit.xhtml b/web/admin/landline/admin_landline_edit.xhtml index 969a36fa..110bf2f8 100644 --- a/web/admin/landline/admin_landline_edit.xhtml +++ b/web/admin/landline/admin_landline_edit.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -38,11 +39,6 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.landLineNumber}" /> </ui:define> </ui:composition> diff --git a/web/admin/landline/admin_landline_list.xhtml b/web/admin/landline/admin_landline_list.xhtml index 426230c8..60099fae 100644 --- a/web/admin/landline/admin_landline_list.xhtml +++ b/web/admin/landline/admin_landline_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -54,11 +55,6 @@ </h:column> </h:dataTable> - <ui:fragment rendered="#{phoneController.allLandLineNumbers().isEmpty()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_LIST_LAND_LINE_EMPTY}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ADMIN_LIST_LAND_LINE_EMPTY}" styleClass="errors" rendered="#{phoneController.allLandLineNumbers().isEmpty()}" /> </ui:define> </ui:composition> diff --git a/web/admin/landline/admin_landline_show.xhtml b/web/admin/landline/admin_landline_show.xhtml index 96a05af0..f26e2f21 100644 --- a/web/admin/landline/admin_landline_show.xhtml +++ b/web/admin/landline/admin_landline_show.xhtml @@ -22,7 +22,7 @@ <ui:define name="content"> <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl"> - <ui:param name="isShowPage" value="#{true}" /> + <ui:param name="isShowPage" value="true" /> </ui:include> <h:dataTable id="contact_landline_link" var="contact" value="#{contactPhoneController.allCurrentLandLineNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" headerClass="table_header_column" styleClass="table_medium"> diff --git a/web/admin/mobile/admin_mobile_delete.xhtml b/web/admin/mobile/admin_mobile_delete.xhtml index a7b54554..add75c94 100644 --- a/web/admin/mobile/admin_mobile_delete.xhtml +++ b/web/admin/mobile/admin_mobile_delete.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -44,11 +45,6 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.mobileNumber}" /> </ui:define> </ui:composition> diff --git a/web/admin/mobile/admin_mobile_edit.xhtml b/web/admin/mobile/admin_mobile_edit.xhtml index c5c6c1fa..578d1da1 100644 --- a/web/admin/mobile/admin_mobile_edit.xhtml +++ b/web/admin/mobile/admin_mobile_edit.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -38,11 +39,6 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" styleClass="errors" rendered="#{empty beanHelper.mobileNumber}" /> </ui:define> </ui:composition> diff --git a/web/admin/mobile/admin_mobile_list.xhtml b/web/admin/mobile/admin_mobile_list.xhtml index e6bedf9a..54cad1fe 100644 --- a/web/admin/mobile/admin_mobile_list.xhtml +++ b/web/admin/mobile/admin_mobile_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -64,11 +65,6 @@ </h:column> </h:dataTable> - <ui:fragment rendered="#{phoneController.allMobileNumbers().isEmpty()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_LIST_MOBILE_EMPTY}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ADMIN_LIST_MOBILE_EMPTY}" styleClass="errors" rendered="#{phoneController.allMobileNumbers().isEmpty()}" /> </ui:define> </ui:composition> diff --git a/web/admin/mobile/admin_mobile_show.xhtml b/web/admin/mobile/admin_mobile_show.xhtml index 6c050819..23d480fd 100644 --- a/web/admin/mobile/admin_mobile_show.xhtml +++ b/web/admin/mobile/admin_mobile_show.xhtml @@ -22,7 +22,7 @@ <ui:define name="content"> <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl"> - <ui:param name="isShowPage" value="#{true}" /> + <ui:param name="isShowPage" value="true" /> </ui:include> <h:dataTable id="contact_mobile_link" var="contact" value="#{contactPhoneController.allCurrentMobileNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" headerClass="table_header_column" styleClass="table_medium"> diff --git a/web/admin/user/admin_user_activity_log.xhtml b/web/admin/user/admin_user_activity_log.xhtml index 6991e52c..6ad32da2 100644 --- a/web/admin/user/admin_user_activity_log.xhtml +++ b/web/admin/user/admin_user_activity_log.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_USER_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.user}" /> <h:dataTable id="table_user_activity_log" var="userActivity" value="#{userActivityController.fetchCurrentUsersActivityLog()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_USER_ACTIVITY_LOG}" rendered="#{not empty beanHelper.user}"> <h:column> diff --git a/web/admin/user/admin_user_delete.xhtml b/web/admin/user/admin_user_delete.xhtml index b95f567a..f9846079 100644 --- a/web/admin/user/admin_user_delete.xhtml +++ b/web/admin/user/admin_user_delete.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_USER_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.user}" /> <h:form id="form_admin_delete_user" rendered="#{not empty beanHelper.user}"> <h:panelGroup styleClass="table_medium" layout="block"> diff --git a/web/admin/user/admin_user_edit.xhtml b/web/admin/user/admin_user_edit.xhtml index e6602eeb..c1c0e130 100644 --- a/web/admin/user/admin_user_edit.xhtml +++ b/web/admin/user/admin_user_edit.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_USER_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.user}" /> <h:form id="form_edit_user" rendered="#{not empty beanHelper.user}"> <h:panelGroup styleClass="table_medium" layout="block"> diff --git a/web/admin/user/admin_user_export.xhtml b/web/admin/user/admin_user_export.xhtml index db18fe83..f9d9310d 100644 --- a/web/admin/user/admin_user_export.xhtml +++ b/web/admin/user/admin_user_export.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" @@ -15,12 +16,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userController.allUsers().isEmpty()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_USER_LIST_EMPTY}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ADMIN_USER_LIST_EMPTY}" styleClass="errors" rendered="#{userController.allUsers().isEmpty()}" /> <h:form id="form_export_users" rendered="#{not userController.allUsers().isEmpty()}"> <p:dataTable id="table_export_users" var="user" value="#{userController.allUsers()}" tableStyleClass="table_full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_USER}"> diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index 74267d91..05707fae 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,12 +15,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userController.allUsers().isEmpty()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ADMIN_USER_LIST_EMPTY}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ADMIN_USER_LIST_EMPTY}" styleClass="errors" rendered="#{userController.allUsers().isEmpty()}" /> <h:dataTable id="table_list_users" var="user" value="#{userController.allUsers()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_USERS}" rendered="#{not userController.allUsers().isEmpty()}"> <h:column> diff --git a/web/admin/user/admin_user_lock.xhtml b/web/admin/user/admin_user_lock.xhtml index 0f1e7b0e..022c6136 100644 --- a/web/admin/user/admin_user_lock.xhtml +++ b/web/admin/user/admin_user_lock.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_USER_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.user}" /> <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}"> <h:panelGroup styleClass="table_medium" layout="block"> diff --git a/web/admin/user/admin_user_resend_confirmation_link.xhtml b/web/admin/user/admin_user_resend_confirmation_link.xhtml index aab5e8e6..79ed9ff8 100644 --- a/web/admin/user/admin_user_resend_confirmation_link.xhtml +++ b/web/admin/user/admin_user_resend_confirmation_link.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_USER_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.user}" /> <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'UNCONFIRMED'}"> <h:panelGroup styleClass="table_medium" layout="block"> @@ -48,7 +44,7 @@ <div class="table_footer"> <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> - <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.resendConfirmationLink(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_RESEND_USER_CONFIRMATION_LINK_ACCOUNT}" /> + <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.resendConfirmationLink()}" value="#{msg.BUTTON_ADMIN_RESEND_USER_CONFIRMATION_LINK_ACCOUNT}" /> </div> </h:panelGroup> </h:form> diff --git a/web/admin/user/admin_user_show.xhtml b/web/admin/user/admin_user_show.xhtml index 02c2dddc..3e6f6916 100644 --- a/web/admin/user/admin_user_show.xhtml +++ b/web/admin/user/admin_user_show.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_USER_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.user}" /> <ui:include src="/WEB-INF/templates/admin/user/admin_show_user_data.tpl" /> diff --git a/web/admin/user/admin_user_unlock.xhtml b/web/admin/user/admin_user_unlock.xhtml index 074c56d1..9c97e6d7 100644 --- a/web/admin/user/admin_user_unlock.xhtml +++ b/web/admin/user/admin_user_unlock.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -21,12 +22,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_USER_ID_NOT_FOUND}" styleClass="errors" rendered="#{empty beanHelper.user}" /> <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}"> <h:panelGroup styleClass="table_medium" layout="block"> diff --git a/web/guest/user/user_confirm_account.xhtml b/web/guest/user/user_confirm_account.xhtml index da804aa4..8087512f 100644 --- a/web/guest/user/user_confirm_account.xhtml +++ b/web/guest/user/user_confirm_account.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -36,19 +37,9 @@ </h:panelGroup> </h:panelGroup> - <ui:fragment rendered="#{empty beanHelper.user}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.GUEST_CONFIRMATION_LINK_INVALID}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.GUEST_CONFIRMATION_LINK_INVALID}" styleClass="errors" rendered="#{empty beanHelper.user}" /> </ui:fragment> - <ui:fragment rendered="#{empty userConfirmationLinkController.confirmationKey}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.GUEST_CONFIRMATION_KEY_NOT_SET}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.GUEST_CONFIRMATION_KEY_NOT_SET}" styleClass="errors" rendered="#{empty userConfirmationLinkController.confirmationKey}" /> </ui:define> </ui:composition> diff --git a/web/guest/user/user_list.xhtml b/web/guest/user/user_list.xhtml index ba45e295..3acd1fd5 100644 --- a/web/guest/user/user_list.xhtml +++ b/web/guest/user/user_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -40,11 +41,6 @@ </h:dataTable> </h:panelGroup>> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_list')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_USER_LIST_DISABLED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_USER_LIST_DISABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('user_list')}" /> </ui:define> </ui:composition> diff --git a/web/guest/user/user_login.xhtml b/web/guest/user/user_login.xhtml index 55e02a4c..4d10f91c 100644 --- a/web/guest/user/user_login.xhtml +++ b/web/guest/user/user_login.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -32,11 +33,6 @@ </h:panelGroup> </ui:fragment> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_login_require_user_name')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_GUEST_USER_LOGIN_DEACTIVATED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_GUEST_USER_LOGIN_DEACTIVATED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('user_login_require_user_name')}" /> </ui:define> </ui:composition> diff --git a/web/guest/user/user_lost_password.xhtml b/web/guest/user/user_lost_password.xhtml index a68301a6..6097ba39 100644 --- a/web/guest/user/user_lost_password.xhtml +++ b/web/guest/user/user_lost_password.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -15,7 +16,7 @@ <ui:define name="content"> <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name') and featureController.isFeatureEnabled('user_password_recovery')}"> - <div class="para" id="user_lost_password_content"> + <div id="user_lost_password_content"> <h:form id="form_lost_password"> <h:panelGroup styleClass="table" layout="block"> <div class="table_header"> @@ -54,7 +55,6 @@ <div class="clear"></div> </h:panelGroup> - </fieldset> <div class="table_footer"> @@ -66,11 +66,6 @@ </div> </ui:fragment> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_login_require_user_name') or not featureController.isFeatureEnabled('user_password_recovery')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('user_login_require_user_name') or not featureController.isFeatureEnabled('user_password_recovery')}" /> </ui:define> </ui:composition> diff --git a/web/guest/user/user_profile.xhtml b/web/guest/user/user_profile.xhtml index 34296e01..8d92dbb5 100644 --- a/web/guest/user/user_profile.xhtml +++ b/web/guest/user/user_profile.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/#{userLoginController.baseTemplatePathName}_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -8,7 +9,7 @@ <ui:define name="metadata"> <f:metadata> <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" /> - <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" /> + <f:viewAction onPostback="true" action="#{beanHelper.notifyControllerUserConverted()}" /> </f:metadata> </ui:define> @@ -30,12 +31,7 @@ <ui:include src="/WEB-INF/templates/user/userid_error.tpl" /> </ui:fragment> - <ui:fragment rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_PROFILE_NOT_VISIBLE}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_PROFILE_NOT_VISIBLE}" styleClass="errors" rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}" /> <ui:fragment rendered="#{profileController.isProfileLinkVisibleById(userController.userId)}"> <div align="center"> @@ -43,16 +39,12 @@ <f:facet name="header"> <h:outputText value="#{msg.PUBLIC_USER_PROFILE}" /> </f:facet> + <!-- @TODO Unfinished --> </h:panelGrid> </div> </ui:fragment> </ui:fragment> - <ui:fragment rendered="#{not userController.isPublicUserProfileEnabled()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_GUEST_USER_PROFILE_DEACTIVATED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_GUEST_USER_PROFILE_DEACTIVATED}" styleClass="errors" rendered="#{not userController.isPublicUserProfileEnabled()}" /> </ui:define> </ui:composition> diff --git a/web/guest/user/user_register.xhtml b/web/guest/user/user_register.xhtml index 792cf678..e3492f8e 100644 --- a/web/guest/user/user_register.xhtml +++ b/web/guest/user/user_register.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -34,18 +35,8 @@ </h:panelGroup> </ui:fragment> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_registration')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_GUEST_REGISTRATION_DISABLED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_GUEST_REGISTRATION_DISABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('user_registration')}" /> - <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration_in_index')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED}" styleClass="errors" rendered="#{featureController.isFeatureEnabled('user_registration_in_index')}" /> </ui:define> </ui:composition> diff --git a/web/guest/user/user_register_page2.xhtml b/web/guest/user/user_register_page2.xhtml index 2c982608..4f946eef 100644 --- a/web/guest/user/user_register_page2.xhtml +++ b/web/guest/user/user_register_page2.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,6 +15,8 @@ </ui:define> <ui:define name="content"> + <generic:outputMessageBox message="#{msg.ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('user_register_multiple_page')}" /> + <ui:fragment rendered="#{featureController.isFeatureEnabled('user_register_multiple_page')}"> <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}"> <div class="para"> @@ -27,12 +30,5 @@ <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl" /> </h:panelGroup> </ui:fragment> - - <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_register_multiple_page')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> </ui:define> </ui:composition> diff --git a/web/guest/user/user_resend_done.xhtml b/web/guest/user/user_resend_done.xhtml index f291735a..917d14c2 100644 --- a/web/guest/user/user_resend_done.xhtml +++ b/web/guest/user/user_resend_done.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,8 +15,6 @@ </ui:define> <ui:define name="content"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.GUEST_USER_RESEND_LINK_COMPLETED}" /> - </ui:include> + <generic:outputMessageBox message="#{msg.GUEST_USER_RESEND_LINK_COMPLETED}" /> </ui:define> </ui:composition> diff --git a/web/guest/user/user_resend_link.xhtml b/web/guest/user/user_resend_link.xhtml index 92742a69..6686887a 100644 --- a/web/guest/user/user_resend_link.xhtml +++ b/web/guest/user/user_resend_link.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -53,11 +54,6 @@ </h:panelGroup> </h:form> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}" /> </ui:define> </ui:composition> diff --git a/web/user/login_contact_data_saved.xhtml b/web/user/login_contact_data_saved.xhtml index 170e5fcb..02a00061 100644 --- a/web/user/login_contact_data_saved.xhtml +++ b/web/user/login_contact_data_saved.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,18 +15,14 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.LOGIN_MESSAGE_DATA_SAVED}" rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}" /> + + <generic:outputMessageBox message="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" /> <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}"> <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" /> </ui:fragment> - <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" /> - <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> </ui:fragment> diff --git a/web/user/login_data_saved.xhtml b/web/user/login_data_saved.xhtml index 6ddb2373..22fa37c0 100644 --- a/web/user/login_data_saved.xhtml +++ b/web/user/login_data_saved.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,11 +15,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.LOGIN_MESSAGE_DATA_SAVED}" rendered="#{userLoginController.isUserLoggedIn()}" /> <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> diff --git a/web/user/login_user_change_email_address.xhtml b/web/user/login_user_change_email_address.xhtml index 36821750..51fbabae 100644 --- a/web/user/login_user_change_email_address.xhtml +++ b/web/user/login_user_change_email_address.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,6 +15,8 @@ </ui:define> <ui:define name="content"> + <generic:outputMessageBox message="#{msg.ERROR_LOGIN_USER_CHANGE_EMAIL_ADDRESS_DISABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('user_change_email_address')}" /> + <h:panelGroup styleClass="table" layout="block" rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('user_change_email_address')}"> <div class="table_header"> <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" /> @@ -51,13 +54,6 @@ </h:form> </h:panelGroup> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_change_email_address')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_CHANGE_EMAIL_ADDRESS_DISABLED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> - <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> <ui:include id="login_only" src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> </ui:fragment> diff --git a/web/user/login_user_change_password.xhtml b/web/user/login_user_change_password.xhtml index 7eddb313..f5cf8969 100644 --- a/web/user/login_user_change_password.xhtml +++ b/web/user/login_user_change_password.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,11 +15,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userLoginController.loggedInUser.userMustChangePassword == true}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.USER_MUST_CHANGE_PASSWORD_NOTICE}" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.USER_MUST_CHANGE_PASSWORD_NOTICE}" rendered="#{userLoginController.loggedInUser.userMustChangePassword == true}" /> <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}"> <h:panelGroup styleClass="table" layout="block" rendered="#{featureController.isFeatureEnabled('change_user_password')}"> @@ -78,12 +75,7 @@ </h:panelGroup> </ui:fragment> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_password')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('change_user_password')}" /> <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> diff --git a/web/user/login_user_change_personal_data.xhtml b/web/user/login_user_change_personal_data.xhtml index 18b8be0d..5794b68a 100644 --- a/web/user/login_user_change_personal_data.xhtml +++ b/web/user/login_user_change_personal_data.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -33,12 +34,7 @@ </h:form> </h:panelGroup> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_personal_data')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('change_user_personal_data')}" /> <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}"> <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" /> diff --git a/web/user/login_user_contact_data_saved.xhtml b/web/user/login_user_contact_data_saved.xhtml index 047c2649..8384359b 100644 --- a/web/user/login_user_contact_data_saved.xhtml +++ b/web/user/login_user_contact_data_saved.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,23 +15,14 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('change_user_personal_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.LOGIN_MESSAGE_DATA_SAVED}" rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('change_user_personal_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}" /> + + <generic:outputMessageBox message="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" styleClass="errors" rendered="#{not featureController.isFeatureEnabled('change_user_personal_data')}" /> <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}"> <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" /> </ui:fragment> - <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_personal_data')}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" /> - <ui:param name="styleClass" value="errors" /> - </ui:include> - </ui:fragment> - <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> </ui:fragment> diff --git a/web/user/login_user_data_saved.xhtml b/web/user/login_user_data_saved.xhtml index aa7c6062..7324ebb0 100644 --- a/web/user/login_user_data_saved.xhtml +++ b/web/user/login_user_data_saved.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:generic="http://mxchange.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,11 +15,7 @@ </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}"> - <ui:include src="/WEB-INF/templates/messages/message_box.tpl"> - <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" /> - </ui:include> - </ui:fragment> + <generic:outputMessageBox message="#{msg.LOGIN_MESSAGE_DATA_SAVED}" rendered="#{userLoginController.isUserLoggedIn() and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}" /> <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}"> <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />