From 4695f402b927fc57e81339257f4862c127d73f62 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 27 Aug 2017 15:02:11 +0200 Subject: [PATCH] Please cherry-pick: - rewrote templates (ui:include with unsafe ui:param) to custom JSF tags ( type-safe parameter, including required parameter) - also the as type set interfaces are being considered by NetBeans auto-complete and matching elements are sorted up and marked bold, very nice! - remove no longer needed i18n strings ("targetController not set" + "mode") MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../localization/bundle_de_DE.properties | 3 +- .../localization/bundle_en_US.properties | 3 +- .../contact/admin_form_contact_data.tpl | 0 .../form_data}/user/admin_form_user_data.tpl | 16 +- .../tags/admin/links}/fax/admin_fax_links.tpl | 0 .../links}/landline/admin_landline_links.tpl | 0 .../links}/mobile/admin_mobile_links.tpl | 2 - .../admin/panel_grids}/fax/admin_fax_data.tpl | 16 +- .../landline/admin_landline_data.tpl | 16 +- .../panel_grids}/mobile/admin_mobile_data.tpl | 20 +- .../tags/profile}/user/user_profile_link.tpl | 2 +- .../tags/table_rows/fax_input_table_row.tpl | 40 +++ .../table_rows/landline_input_table_row.tpl | 40 +++ .../table_rows/mobile_selection_table_row.tpl | 6 +- .../user_personal_title_table_row.tpl | 4 +- .../user_profile_mode_table_row.tpl | 6 +- .../admin/fax/admin_fax_add_show.tpl | 4 +- .../admin/fax/admin_form_add_contact_fax.tpl | 20 +- .../admin/fax/admin_form_fax_data.tpl | 20 +- .../admin_form_add_contact_landline.tpl | 20 +- .../landline/admin_form_landline_data.tpl | 20 +- .../landline/admin_landline_add_show.tpl | 4 +- .../admin/mobile/admin_mobile_add_show.tpl | 6 +- .../user/admin_form_user_personal_data.tpl | 6 +- .../input_fields/fax_input_fields.tpl | 26 -- .../input_fields/landline_input_fields.tpl | 26 -- web/WEB-INF/widgets.jsf.taglib.xml | 229 +++++++++++++++++- web/admin/contact/admin_contact_edit.xhtml | 2 +- web/admin/contact/admin_contact_list.xhtml | 2 +- .../unlink/admin_contact_fax_unlink.xhtml | 5 +- .../admin_contact_landline_unlink.xhtml | 13 +- .../unlink/admin_contact_mobile_unlink.xhtml | 5 +- web/admin/fax/admin_fax_delete.xhtml | 5 +- web/admin/fax/admin_fax_show.xhtml | 5 +- .../landline/admin_landline_delete.xhtml | 5 +- web/admin/landline/admin_landline_show.xhtml | 5 +- web/admin/mobile/admin_mobile_delete.xhtml | 5 +- web/admin/mobile/admin_mobile_show.xhtml | 5 +- web/admin/user/admin_user_edit.xhtml | 4 +- web/guest/user/user_list.xhtml | 4 +- 40 files changed, 374 insertions(+), 246 deletions(-) rename web/WEB-INF/resources/tags/admin/{ => form_data}/contact/admin_form_contact_data.tpl (100%) rename web/WEB-INF/{templates/admin => resources/tags/admin/form_data}/user/admin_form_user_data.tpl (80%) rename web/WEB-INF/{templates/admin => resources/tags/admin/links}/fax/admin_fax_links.tpl (100%) rename web/WEB-INF/{templates/admin => resources/tags/admin/links}/landline/admin_landline_links.tpl (100%) rename web/WEB-INF/{templates/admin => resources/tags/admin/links}/mobile/admin_mobile_links.tpl (91%) rename web/WEB-INF/{templates/admin => resources/tags/admin/panel_grids}/fax/admin_fax_data.tpl (71%) rename web/WEB-INF/{templates/admin => resources/tags/admin/panel_grids}/landline/admin_landline_data.tpl (72%) rename web/WEB-INF/{templates/admin => resources/tags/admin/panel_grids}/mobile/admin_mobile_data.tpl (68%) rename web/WEB-INF/{templates => resources/tags/profile}/user/user_profile_link.tpl (75%) create mode 100644 web/WEB-INF/resources/tags/table_rows/fax_input_table_row.tpl create mode 100644 web/WEB-INF/resources/tags/table_rows/landline_input_table_row.tpl delete mode 100644 web/WEB-INF/templates/input_fields/fax_input_fields.tpl delete mode 100644 web/WEB-INF/templates/input_fields/landline_input_fields.tpl diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 81dcf3f2..3fe64e04 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -289,7 +289,6 @@ ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Land: ADMIN_LINK_EDIT_DELETE_COUNTRY_TITLE=Editieren oder l\u00f6schen der L\u00e4nderdaten TABLE_SUMMARY_ADMIN_LIST_COUNTRIES=Listet alle bereits angelegten L\u00e4nderdaten auf. COUNTRY_GERMANY=Deutschland -ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET=Fehler: Der Parameter 'targetController' ist nicht gesetzt. ADMIN_MENU_MOBILE_PROVIDER_TITLE=Handyanbieter LINK_ADMIN_LIST_MOBILE_PROVIDER_TITLE=Hinzuf\u00fcgen, auflisten, \u00e4ndern und l\u00f6schen von Handyanbietern. PAGE_TITLE_ADMIN_MOBILE_PROVIDER_LIST=Handyanbieter verwalten @@ -411,7 +410,6 @@ ADMIN_LINK_EDIT_CONTACT_TITLE=Hier k\u00f6nnen Sie die Kontaktdaten editieren. BUTTON_ADMIN_EDIT_USER=Benutzerdaten \u00e4ndern ADMIN_EDIT_USER_TITLE=Benutzerdaten editieren ADMIN_DATA_PASSWORD_EDIT_NOTICE=Wenn Sie das Passwort \u00e4ndern wollen, m\u00fcssen Sie es zweimal eingeben, anderfalls beide leer lassen. -ERROR_PARAMETER_MODE_NOT_SET=Fehler: Parameter 'mode' nicht gesetzt. ADMIN_EDIT_CONTACT_TITLE=Kontaktdaten editieren (Id-Nummer: {0}) BUTTON_ADMIN_EDIT_CONTACT=Kontaktdaten \u00e4ndern PAGE_TITLE_ADMIN_LIST_CONTACT=Kotaktdaten auflisten @@ -865,3 +863,4 @@ ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_COMPANY_FOUNDER_TITLE=Daten des Unternehmens #@TODO Please fix German umlauts! ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_COMPANY_FOUNDER_TITLE=Weisst diesem Firmeneintrag einen Unternehmensgruender zu. ADMIN_BUSINESS_BASIC_DATA_CREATED=Eintrag erstellt +ADMIN_USER_NAME_IS_REQUIRED=Bitte vergeben Sie einen Benutzernamen. Dieser muss unique sein. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 27a590aa..d56216bb 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -272,7 +272,6 @@ ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME=Country: ADMIN_LINK_EDIT_DELETE_COUNTRY_TITLE=Edit or delete country TABLE_SUMMARY_ADMIN_LIST_COUNTRIES=List of all already added countries. COUNTRY_GERMANY=Germany -ERROR_PARAMETER_TARGET_CONTROLLER_NOT_SET=Error: The parameter 'targetController' is not set. ADMIN_MENU_MOBILE_PROVIDER_TITLE=Mobile providers LINK_ADMIN_LIST_MOBILE_PROVIDER=List mobile provider LINK_ADMIN_LIST_MOBILE_PROVIDER_TITLE=Add, list, edit and delete mobile providers. @@ -391,7 +390,6 @@ ADMIN_LINK_EDIT_CONTACT_TITLE=Here you can edit contact data. BUTTON_ADMIN_EDIT_USER=Change user data ADMIN_EDIT_USER_TITLE=Edit user data ADMIN_DATA_PASSWORD_EDIT_NOTICE=If you want to change the password, enter it twice, otherwise leave both empty. -ERROR_PARAMETER_MODE_NOT_SET=Error: Parameter 'mode' is not set. ADMIN_EDIT_CONTACT_TITLE=Edit contact data (id number: {0}) BUTTON_ADMIN_EDIT_CONTACT=Change contact data PAGE_TITLE_ADMIN_LIST_CONTACT=List contact entries @@ -838,3 +836,4 @@ ADMIN_BUSINESS_BASIC_DATA_COMPANY_FOUNDER=Founder ADMIN_LINK_SHOW_BUSINESS_BASIC_DATA_COMPANY_FOUNDER_TITLE=Show data of company founder. ADMIN_LINK_ASSIGN_BUSINESS_BASIC_DATA_COMPANY_FOUNDER_TITLE=Assigns a company founder to this company entry. ADMIN_BUSINESS_BASIC_DATA_CREATED=Entry created +ADMIN_USER_NAME_IS_REQUIRED=Please enter a user name. This must be unique. diff --git a/web/WEB-INF/resources/tags/admin/contact/admin_form_contact_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl similarity index 100% rename from web/WEB-INF/resources/tags/admin/contact/admin_form_contact_data.tpl rename to web/WEB-INF/resources/tags/admin/form_data/contact/admin_form_contact_data.tpl diff --git a/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl b/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl similarity index 80% rename from web/WEB-INF/templates/admin/user/admin_form_user_data.tpl rename to web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl index d81fba61..b9573ae6 100644 --- a/web/WEB-INF/templates/admin/user/admin_form_user_data.tpl +++ b/web/WEB-INF/resources/tags/admin/form_data/user/admin_form_user_data.tpl @@ -6,8 +6,6 @@ xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - -
@@ -20,10 +18,14 @@
- +
+ + + +
@@ -34,6 +36,10 @@
+ + + +
@@ -44,6 +50,10 @@
+ + + +
diff --git a/web/WEB-INF/templates/admin/fax/admin_fax_links.tpl b/web/WEB-INF/resources/tags/admin/links/fax/admin_fax_links.tpl similarity index 100% rename from web/WEB-INF/templates/admin/fax/admin_fax_links.tpl rename to web/WEB-INF/resources/tags/admin/links/fax/admin_fax_links.tpl diff --git a/web/WEB-INF/templates/admin/landline/admin_landline_links.tpl b/web/WEB-INF/resources/tags/admin/links/landline/admin_landline_links.tpl similarity index 100% rename from web/WEB-INF/templates/admin/landline/admin_landline_links.tpl rename to web/WEB-INF/resources/tags/admin/links/landline/admin_landline_links.tpl diff --git a/web/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl b/web/WEB-INF/resources/tags/admin/links/mobile/admin_mobile_links.tpl similarity index 91% rename from web/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl rename to web/WEB-INF/resources/tags/admin/links/mobile/admin_mobile_links.tpl index 08d3b88d..fa27d6ee 100644 --- a/web/WEB-INF/templates/admin/mobile/admin_mobile_links.tpl +++ b/web/WEB-INF/resources/tags/admin/links/mobile/admin_mobile_links.tpl @@ -6,8 +6,6 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - -
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 22d08e9e..30b289b5 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 @@ -36,25 +36,7 @@ - -
- -
- -
- - - -
-
- - - - - - - - + - -
- -
- -
- - - -
-
- - - - - - - - + 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 460f4f53..bac827a8 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 @@ -12,7 +12,5 @@ - - - + 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 8328e23f..abe6b12d 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 @@ -6,13 +6,11 @@ xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - - - + diff --git a/web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl b/web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl index 53c67426..724f72ac 100644 --- a/web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl +++ b/web/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl @@ -6,13 +6,11 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - - +
- + diff --git a/web/WEB-INF/templates/input_fields/fax_input_fields.tpl b/web/WEB-INF/templates/input_fields/fax_input_fields.tpl deleted file mode 100644 index 94b2cfdd..00000000 --- a/web/WEB-INF/templates/input_fields/fax_input_fields.tpl +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/web/WEB-INF/templates/input_fields/landline_input_fields.tpl b/web/WEB-INF/templates/input_fields/landline_input_fields.tpl deleted file mode 100644 index 8de46d3e..00000000 --- a/web/WEB-INF/templates/input_fields/landline_input_fields.tpl +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/web/WEB-INF/widgets.jsf.taglib.xml b/web/WEB-INF/widgets.jsf.taglib.xml index e0d1ac34..66d02b6b 100644 --- a/web/WEB-INF/widgets.jsf.taglib.xml +++ b/web/WEB-INF/widgets.jsf.taglib.xml @@ -111,8 +111,7 @@ along with this program. If not, see . labelMessage A localized message for the rendered label tag. You should use EL code here to add a label message from your bundle. true - - org.mxchange.jcoreee.bean.faces.BaseFacesBean + java.lang.String rendered @@ -131,18 +130,238 @@ along with this program. If not, see . outputAdminContactDataFormFields This tag renders a fieldset for administrative purposes of contact data. - resources/tags/admin/contact/admin_form_contact_data.tpl + resources/tags/admin/form_data/contact/admin_form_contact_data.tpl allowEmptyRequiredData Whether allow the personal title to be left empty. This might be the case when you create a user and want to select a contact from a selection box. EL code resolving to a boolean may be allowed here. false java.lang.Boolean + + + outputAdminUserDataFormFields + This tag renders a fieldset for administrative purposes of user data. + resources/tags/admin/form_data/user/admin_form_user_data.tpl + + mode + Mode of the form, must be one of "add" or "edit". + true + java.lang.String + + + + outputUserProfileLink + This tag renders a h:link JSF tag for a user profile. + resources/tags/profile/user/user_profile_link.tpl + + user + An instance of a User class. + true + org.mxchange.jusercore.model.user.User + + + + outputAdminFaxPanelGrid + This tag renders a full h:panelGrid for administrative purposes for fax data. + resources/tags/admin/panel_grids/fax/admin_fax_data.tpl + + isShowPage + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + faxNumber + The fax instance that provides the data for this tag. + true + org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + showAdminLinks + Whether to show administrative links to other pages (default: true). + false + java.lang.Boolean + + + + outputAdminLandLinePanelGrid + This tag renders a full h:panelGrid for administrative purposes for land-line data. + resources/tags/admin/panel_grids/landline/admin_landline_data.tpl + + isShowPage + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + landLineNumber + The fax instance that provides the data for this tag. + true + org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + showAdminLinks + Whether to show administrative links to other pages (default: true). + false + java.lang.Boolean + + + + outputAdminMobilePanelGrid + This tag renders a full h:panelGrid for administrative purposes for mobile data. + resources/tags/admin/panel_grids/mobile/admin_mobile_data.tpl + + isShowPage + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + mobileNumber + The mobile instance that provides the data for this tag. + true + org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + showAdminLinks + Whether to show administrative links to other pages (default: true). + false + java.lang.Boolean + + + + outputFaxInputTableRow + This tag renders a h:panelGroup with input fields for fax numbers. + resources/tags/table_rows/fax_input_table_row.tpl + + targetController + A target backing bean (EL code resolving into it) extending at least BaseFacesBean where to set the data in. + true + + org.mxchange.jcoreee.bean.faces.BaseFacesBean + + + labelMessage + A localized message for the rendered label tag. You should use EL code here to add a label message from your bundle. + true + java.lang.String + - formMode - Mode of the form, can be one of "add" or "edit", defaulting to "add". + rendered + Whether this tag is being rendered by JSF engine. false + java.lang.Boolean + + + + outputLandLineInputTableRow + This tag renders a h:panelGroup with input fields for land-line numbers. + resources/tags/table_rows/landline_input_table_row.tpl + + targetController + A target backing bean (EL code resolving into it) extending at least BaseFacesBean where to set the data in. + true + + org.mxchange.jcoreee.bean.faces.BaseFacesBean + + + labelMessage + A localized message for the rendered label tag. You should use EL code here to add a label message from your bundle. + true java.lang.String + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputAdminFaxLinks + This tag renders a full h:panelGroup for administrative links for fax data. + resources/tags/admin/links/fax/admin_fax_data.tpl + + isShowPage + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + faxNumber + The fax instance that provides the data for this tag. + true + org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputAdminLandLineLinks + This tag renders a full h:panelGroup for administrative links for land-line data. + resources/tags/admin/panel_grids/landline/admin_landline_data.tpl + + isShowPage + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + landLineNumber + The fax instance that provides the data for this tag. + true + org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputAdminMobileLinks + This tag renders a full h:panelGroup for administrative links for mobile data. + resources/tags/admin/panel_grids/mobile/admin_mobile_data.tpl + + isShowPage + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + mobileNumber + The mobile instance that provides the data for this tag. + true + org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + diff --git a/web/admin/contact/admin_contact_edit.xhtml b/web/admin/contact/admin_contact_edit.xhtml index c762a9dd..384ad7a7 100644 --- a/web/admin/contact/admin_contact_edit.xhtml +++ b/web/admin/contact/admin_contact_edit.xhtml @@ -36,7 +36,7 @@ - + - +
- - - - +