From 2050f034a4097934f31a4fc1714322026805ec1a Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Tue, 15 May 2018 00:49:05 +0200
Subject: [PATCH] Product-only: - moved > of <ui:composition> to new line to
 have newly added namspaces being   added without causing 2 lines being
 changed - wrapped long JSF/PF tags having each attribute in a single line -
 added size, maxValue and minValue to productUnitAmount - onPostback has
 caused some side effect that values got overwritten in e.g.   edit views - no
 longer using tableStyleClass - changed i18n strings, no need for having
 PRODUCT_ prefix on e.g. net/gross   price strings - no longer using
 styleClass="submit|reset" - added process="@form" as a workaround for an
 exception, according to BalusC   this is not fixing the actual application's
 misconfiguration (where which?)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Roland Häder <roland@mxchange.org>
---
 web/WEB-INF/product-links.jsf.taglib.xml      | 10 +--
 web/WEB-INF/product.jsf.taglib.xml            | 10 +--
 .../admin_generic_product_links.tpl           |  3 +-
 .../admin_product_category_links.tpl          |  3 +-
 .../product_price_input_panel_grid.tpl        | 11 ++-
 .../admin_form_product_data.tpl               | 32 ++++++---
 .../admin_form_category_data.tpl              | 10 ++-
 .../admin_generic_product_delete.xhtml        | 17 ++---
 .../admin_generic_product_edit.xhtml          | 57 ++++++++++++---
 .../admin_generic_product_list.xhtml          | 70 ++++++++++++-------
 .../admin_generic_product_show.xhtml          | 17 ++---
 .../admin_product_category_list.xhtml         | 53 +++++++++-----
 12 files changed, 197 insertions(+), 96 deletions(-)

diff --git a/web/WEB-INF/product-links.jsf.taglib.xml b/web/WEB-INF/product-links.jsf.taglib.xml
index 151b235b..1d587aeb 100644
--- a/web/WEB-INF/product-links.jsf.taglib.xml
+++ b/web/WEB-INF/product-links.jsf.taglib.xml
@@ -15,10 +15,12 @@ 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">
+<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/jproduct/links</namespace>
 	<tag>
 		<tag-name>outputProductCategoryAdminMiniLinks</tag-name>
diff --git a/web/WEB-INF/product.jsf.taglib.xml b/web/WEB-INF/product.jsf.taglib.xml
index bbe8e8d9..a33d611e 100644
--- a/web/WEB-INF/product.jsf.taglib.xml
+++ b/web/WEB-INF/product.jsf.taglib.xml
@@ -15,10 +15,12 @@ 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">
+<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/jproduct/widgets</namespace>
 	<tag>
 		<tag-name>inputProductPricePanelGrid</tag-name>
diff --git a/web/WEB-INF/resources/tags/admin/links/mini/generic_product/admin_generic_product_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/generic_product/admin_generic_product_links.tpl
index 82c82599..4497520c 100644
--- a/web/WEB-INF/resources/tags/admin/links/mini/generic_product/admin_generic_product_links.tpl
+++ b/web/WEB-INF/resources/tags/admin/links/mini/generic_product/admin_generic_product_links.tpl
@@ -4,7 +4,8 @@
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-	xmlns:p="http://primefaces.org/ui">
+	xmlns:p="http://primefaces.org/ui"
+	>
 
 	<ui:fragment rendered="#{empty rendered or rendered}">
 		<ul class="navbar-mini">
diff --git a/web/WEB-INF/resources/tags/admin/links/mini/product_category/admin_product_category_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/product_category/admin_product_category_links.tpl
index d606bd3b..81d15a7e 100644
--- a/web/WEB-INF/resources/tags/admin/links/mini/product_category/admin_product_category_links.tpl
+++ b/web/WEB-INF/resources/tags/admin/links/mini/product_category/admin_product_category_links.tpl
@@ -4,7 +4,8 @@
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-	xmlns:p="http://primefaces.org/ui">
+	xmlns:p="http://primefaces.org/ui"
+	>
 
 	<ui:fragment rendered="#{empty rendered or rendered}">
 		<ul class="navbar-mini">
diff --git a/web/WEB-INF/resources/tags/input/panel_grid/generic_product/product_price_input_panel_grid.tpl b/web/WEB-INF/resources/tags/input/panel_grid/generic_product/product_price_input_panel_grid.tpl
index c94e106f..d01cfbd6 100644
--- a/web/WEB-INF/resources/tags/input/panel_grid/generic_product/product_price_input_panel_grid.tpl
+++ b/web/WEB-INF/resources/tags/input/panel_grid/generic_product/product_price_input_panel_grid.tpl
@@ -4,9 +4,16 @@
 	xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-	xmlns:p="http://primefaces.org/ui">
+	xmlns:p="http://primefaces.org/ui"
+	>
 
-	<p:panelGrid layout="grid" columns="3" columnClasses="ui-grid-col-3,ui-grid-col-2,ui-grid-col-3" styleClass="table table-full ui-noborder" rendered="#{empty rendered or rendered == true}">
+	<p:panelGrid
+		layout="grid"
+		columns="3"
+		columnClasses="ui-grid-col-3,ui-grid-col-2,ui-grid-col-3"
+		styleClass="ui-noborder"
+		rendered="#{empty rendered or rendered == true}"
+		>
 		<p:outputLabel for="productNetPrice" value="#{project.ENTER_NET_PRICE}" />
 
 		<p:outputLabel for="productTaxRate" value="#{project.ENTER_TAX_RATE}" />
diff --git a/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl b/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
index 3e6288b6..4a481e7b 100644
--- a/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
+++ b/web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
@@ -7,10 +7,17 @@
 	xmlns:product="http://mxchange.org/jsf/jproduct/widgets"
 	xmlns:f="http://xmlns.jcp.org/jsf/core"
 	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-	xmlns:p="http://primefaces.org/ui">
+	xmlns:p="http://primefaces.org/ui"
+	xmlns:h="http://xmlns.jcp.org/jsf/html"
+	>
 
 	<p:fieldset legend="#{project.ADMIN_GENERIC_PRODUCT_DATA_LEGEND}">
-		<p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4,ui-grid-col-8" styleClass="table table-full ui-noborder">
+		<p:panelGrid
+			layout="grid"
+			columns="2"
+			columnClasses="ui-grid-col-4,ui-grid-col-8"
+			styleClass="ui-noborder"
+			>
 			<p:outputLabel for="productCategory" value="#{project.ADMIN_ASSIGN_PRODUCT_CATEGORY}" />
 			<p:selectOneMenu
 				id="productCategory"
@@ -110,6 +117,9 @@
 			<p:inputNumber
 				id="productUnitAmount"
 				value="#{adminProductController.productUnitAmount}"
+				size="20"
+				minValue="0.001"
+				maxValue="20000.000"
 				decimalSeparator=","
 				thousandSeparator="."
 				title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT_TITLE}"
@@ -118,15 +128,15 @@
 				/>
 
 			<p:outputLabel for="productUnitI18nKey" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY}" />
-			<p:inputText
-				id="productUnitI18nKey"
-				value="#{adminProductController.productUnitI18nKey}"
-				size="20"
-				maxlength="255"
-				title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE}"
-				required="true"
-				requiredMessage="#{project.ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED}"
+				<p:inputText
+					id="productUnitI18nKey"
+					value="#{adminProductController.productUnitI18nKey}"
+					size="20"
+					maxlength="255"
+					title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE}"
+					required="true"
+					requiredMessage="#{project.ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED}"
 				/>
-		</p:panelGrid>
+			</p:panelGrid>
 	</p:fieldset>
 </ui:composition>
diff --git a/web/WEB-INF/templates/admin/product_category/admin_form_category_data.tpl b/web/WEB-INF/templates/admin/product_category/admin_form_category_data.tpl
index 19b2d1ca..e5473bd4 100644
--- a/web/WEB-INF/templates/admin/product_category/admin_form_category_data.tpl
+++ b/web/WEB-INF/templates/admin/product_category/admin_form_category_data.tpl
@@ -6,10 +6,16 @@
 	xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:f="http://xmlns.jcp.org/jsf/core"
 	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-	xmlns:p="http://primefaces.org/ui">
+	xmlns:p="http://primefaces.org/ui"
+	>
 
 	<p:fieldset legend="#{project.ADMIN_PRODUCT_CATEGORY_DATA_LEGEND}">
-		<p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4,ui-grid-col-8" styleClass="table table-full ui-noborder">
+		<p:panelGrid
+			layout="grid"
+			columns="2"
+			columnClasses="ui-grid-col-4,ui-grid-col-8"
+			styleClass="ui-noborder"
+			>
 			<p:outputLabel for="parentCategory" value="#{project.ADMIN_ASSIGN_PARENT_CATEGORY}" />
 			<p:selectOneMenu
 				id="parentCategory"
diff --git a/web/admin/generic_product/admin_generic_product_delete.xhtml b/web/admin/generic_product/admin_generic_product_delete.xhtml
index a04b5106..c137ac6a 100644
--- a/web/admin/generic_product/admin_generic_product_delete.xhtml
+++ b/web/admin/generic_product/admin_generic_product_delete.xhtml
@@ -1,16 +1,17 @@
 <?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:ui="http://xmlns.jcp.org/jsf/facelets"
-				xmlns:h="http://xmlns.jcp.org/jsf/html"
-				xmlns:f="http://xmlns.jcp.org/jsf/core"
-				xmlns:p="http://primefaces.org/ui"
-				>
+<ui:composition
+	template="/WEB-INF/templates/admin/admin_base.tpl"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+	xmlns:h="http://xmlns.jcp.org/jsf/html"
+	xmlns:f="http://xmlns.jcp.org/jsf/core"
+	xmlns:p="http://primefaces.org/ui"
+	>
 
 	<ui:define name="metadata">
 		<f:metadata>
 			<f:viewParam id="productId" name="productId" value="#{productBeanHelper.product}" converter="GenericProductConverter" required="true" requiredMessage="#{project.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}" converterMessage="#{project.PARAMETER_PRODUCT_ID_INVALID}" />
-			<f:viewAction onPostback="true" action="#{productBeanHelper.notifyControllerProductConverted()}" />
+			<f:viewAction action="#{productBeanHelper.notifyControllerProductConverted()}" />
 		</f:metadata>
 	</ui:define>
 
diff --git a/web/admin/generic_product/admin_generic_product_edit.xhtml b/web/admin/generic_product/admin_generic_product_edit.xhtml
index faa55053..2b66f87f 100644
--- a/web/admin/generic_product/admin_generic_product_edit.xhtml
+++ b/web/admin/generic_product/admin_generic_product_edit.xhtml
@@ -1,16 +1,17 @@
 <?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:ui="http://xmlns.jcp.org/jsf/facelets"
-				xmlns:h="http://xmlns.jcp.org/jsf/html"
-				xmlns:f="http://xmlns.jcp.org/jsf/core"
-				xmlns:p="http://primefaces.org/ui"
-				>
+<ui:composition
+	template="/WEB-INF/templates/admin/admin_base.tpl"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+	xmlns:h="http://xmlns.jcp.org/jsf/html"
+	xmlns:f="http://xmlns.jcp.org/jsf/core"
+	xmlns:p="http://primefaces.org/ui"
+	>
 
 	<ui:define name="metadata">
 		<f:metadata>
 			<f:viewParam id="productId" name="productId" value="#{productBeanHelper.product}" converter="GenericProductConverter" required="true" requiredMessage="#{project.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}" converterMessage="#{project.PARAMETER_PRODUCT_ID_INVALID}" />
-			<f:viewAction onPostback="true" action="#{productBeanHelper.notifyControllerProductConverted()}" />
+			<f:viewAction action="#{productBeanHelper.notifyControllerProductConverted()}" />
 		</f:metadata>
 	</ui:define>
 
@@ -23,7 +24,43 @@
 	</ui:define>
 
 	<ui:define name="content">
-		<p:message for="productId" showSummary="true" />
-		<!-- @TODO Here goes your content. //-->
+		<p:message for="productId" showSummary="true" rendered="#{empty productBeanHelper.product}" />
+
+		<h:form id="form-edit-product" rendered="#{not empty productBeanHelper.product}">
+			<h:inputHidden value="#{adminProductController.productId}" />
+
+			<p:panelGrid
+				columns="1"
+				layout="grid"
+				>
+				<f:facet name="header">
+					<h:outputFormat value="#{project.ADMIN_EDIT_GENERIC_PRODUCT_TITLE}" title="#{local[productBeanHelper.product.productI18nKey]}">
+						<f:param value="#{productBeanHelper.product.productId}" />
+					</h:outputFormat>
+				</f:facet>
+
+				<h:panelGroup styleClass="para" layout="block">
+					<h:outputText value="#{project.ADMIN_EDIT_GENERIC_PRODUCT_MINIMUM_DATA}" />
+				</h:panelGroup>
+
+				<ui:include src="/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl" />
+
+				<f:facet name="footer">
+					<p:panelGrid columns="2" layout="grid">
+						<p:commandButton
+							type="reset"
+							value="#{msg.BUTTON_RESET_FORM}"
+							/>
+
+						<p:commandButton
+							process="@form"
+							type="submit"
+							value="#{project.BUTTON_ADMIN_EDIT_GENERIC_PRODUCT}"
+							action="#{adminProductController.updateProduct()}"
+							/>
+					</p:panelGrid>
+				</f:facet>
+			</p:panelGrid>
+		</h:form>
 	</ui:define>
 </ui:composition>
diff --git a/web/admin/generic_product/admin_generic_product_list.xhtml b/web/admin/generic_product/admin_generic_product_list.xhtml
index dc38c6d9..eb2d7862 100644
--- a/web/admin/generic_product/admin_generic_product_list.xhtml
+++ b/web/admin/generic_product/admin_generic_product_list.xhtml
@@ -1,12 +1,13 @@
 <?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:product-links="http://mxchange.org/jsf/jproduct/links"
-				xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-				xmlns:h="http://xmlns.jcp.org/jsf/html"
-				xmlns:f="http://xmlns.jcp.org/jsf/core"
-				xmlns:p="http://primefaces.org/ui"
-				>
+<ui:composition
+	template="/WEB-INF/templates/admin/admin_base.tpl"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:product-links="http://mxchange.org/jsf/jproduct/links"
+	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+	xmlns:h="http://xmlns.jcp.org/jsf/html"
+	xmlns:f="http://xmlns.jcp.org/jsf/core"
+	xmlns:p="http://primefaces.org/ui"
+	>
 
 	<ui:define name="document_admin_title">
 		<h:outputText value="#{project.PAGE_TITLE_ADMIN_LIST_GENERIC_PRODUCT}" />
@@ -22,7 +23,6 @@
 				id="productList"
 				var="product"
 				value="#{productListController.allProducts}"
-				tableStyleClass="table table-full"
 				paginator="true"
 				paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
 				filteredValue="#{productListController.filteredProducts}"
@@ -41,17 +41,33 @@
 				>
 
 				<f:facet name="header">
-					<p:panelGrid columns="3" layout="grid" columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2">
+					<p:panelGrid
+						columns="3"
+						layout="grid"
+						columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
+						>
 						<p:spacer />
 
-						<p:panelGrid columns="2" columnClasses="ui-grid-4,ui-grid-8" layout="grid" styleClass="table table-full ui-noborder">
+						<p:panelGrid
+							columns="2"
+							columnClasses="ui-grid-4,ui-grid-8"
+							layout="grid"
+							styleClass="ui-noborder"
+							>
 							<p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
 							<p:inputText id="globalFilter" onkeyup="PF('productList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
 						</p:panelGrid>
 
 						<p:outputPanel>
 							<p:spacer height="4" />
-							<p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
+
+							<p:commandButton
+								id="toggler"
+								type="button"
+								value="#{msg.SELECT_SHOWN_COLUMNS}"
+								styleClass="column-selector"
+								/>
+
 							<p:columnToggler datasource="productList" trigger="toggler" />
 						</p:outputPanel>
 					</p:panelGrid>
@@ -69,7 +85,7 @@
 					</p:link>
 				</p:column>
 
-				<p:column headerText="#{msg.ADMIN_I18N_KEY_HEADER}" sortBy="#{product.productI18nKey}" filterBy="#{product.productI18nKey}">
+				<p:column headerText="#{msg.ADMIN_I18N_KEY_HEADER}" sortBy="#{local[product.productI18nKey]}" filterBy="#{local[product.productI18nKey]}" filterMatchMode="contains">
 					<h:outputText value="#{local[product.productI18nKey]}" title="#{product.productI18nKey}" />
 				</p:column>
 
@@ -93,7 +109,7 @@
 					</p:link>
 				</p:column>
 
-				<p:column headerText="#{project.ADMIN_PRODUCT_GROSS_PRICE_HEADER}" sortBy="#{product.productGrossPrice}" filterBy="#{product.productGrossPrice}" filterFunction="#{productListController.filterByPrice}">
+				<p:column headerText="#{project.GROSS_PRICE_HEADER}" sortBy="#{product.productGrossPrice}" filterBy="#{product.productGrossPrice}" filterFunction="#{productListController.filterByPrice}">
 					<h:outputText value="#{product.productGrossPrice}">
 						<!-- @TODO Hard-coded EUR again -->
 						<f:convertNumber type="currency" currencyCode="EUR" />
@@ -136,8 +152,8 @@
 				</p:column>
 
 				<p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{product.productCreated}" filterable="false">
-					<h:outputText id="productCreated" value="#{product.productCreated.time}">
-						<f:convertDateTime for="productCreated" type="both" timeStyle="short" dateStyle="short" />
+					<h:outputText id="productCreated" value="#{product.productCreated}">
+						<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
 					</h:outputText>
 				</p:column>
 
@@ -154,11 +170,11 @@
 				hideEffect="fade"
 				showEffect="fade"
 				widgetVar="productDialog"
-				position="center,center"
+				position="top"
 				responsive="true"
 				>
 				<p:outputPanel id="product-details">
-					<p:panelGrid columns="2" rendered="#{not empty productListController.selectedProduct}" columnClasses="label,value">
+					<p:panelGrid columns="2" rendered="#{not empty productListController.selectedProduct}">
 						<f:facet name="header">
 							<h:outputFormat value="#{project.ADMIN_PRODUCT_DETAILS_HEADER}">
 								<f:param value="#{local[productListController.selectedProduct.productI18nKey]}" />
@@ -185,19 +201,19 @@
 						<p:outputLabel value="#{project.CURRENCY_CODE_HEADER}" title="#{project.PRODUCT_CURRENCY_CODE_TITLE}" />
 						<h:outputText value="#{productListController.selectedProduct.productCurrencyCode}" />
 
-						<p:outputLabel value="#{project.PRODUCT_GROSS_PRICE_HEADER}" title="#{project.PRODUCT_GROSS_PRICE_TITLE}" />
+						<p:outputLabel value="#{project.GROSS_PRICE_HEADER}" title="#{project.PRODUCT_GROSS_PRICE_TITLE}" />
 						<h:outputText value="#{productListController.selectedProduct.productGrossPrice}">
 							<!-- @TODO Hard-coded EUR again -->
 							<f:convertNumber type="currency" currencyCode="EUR" />
 						</h:outputText>
 
-						<p:outputLabel value="#{project.PRODUCT_NET_PRICE_HEADER}" title="#{project.PRODUCT_NET_PRICE_TITLE}" />
+						<p:outputLabel value="#{project.NET_PRICE_HEADER}" title="#{project.PRODUCT_NET_PRICE_TITLE}" />
 						<h:outputText value="#{productListController.selectedProduct.productNetPrice}">
 							<!-- @TODO Hard-coded EUR again -->
 							<f:convertNumber type="currency" currencyCode="EUR" />
 						</h:outputText>
 
-						<p:outputLabel value="#{project.PRODUCT_TAX_RATE_HEADER}" title="#{project.PRODUCT_TAX_RATE_TITLE}" />
+						<p:outputLabel value="#{project.TAX_RATE_HEADER}" title="#{project.PRODUCT_TAX_RATE_TITLE}" />
 						<h:outputText value="#{productListController.selectedProduct.productTaxRate}">
 							<!-- @TODO No real percentage number, 7.0 means 7.0%, not 700% -->
 							<f:convertNumber type="number" />
@@ -234,8 +250,8 @@
 						<h:outputText value="#{project.PRODUCT_HAS_NO_MANUFACTURER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productManufacturer}" />
 
 						<p:outputLabel value="#{msg.ENTRY_CREATED_HEADER}" title="#{project.ADMIN_PRODUCT_ENTRY_CREATED_TITLE}" />
-						<h:outputText id="productCreated" value="#{productListController.selectedProduct.productCreated.time}">
-							<f:convertDateTime for="productCreated" type="both" timeStyle="short" dateStyle="short" />
+						<h:outputText id="productCreated" value="#{productListController.selectedProduct.productCreated}">
+							<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
 						</h:outputText>
 					</p:panelGrid>
 				</p:outputPanel>
@@ -243,7 +259,10 @@
 		</h:form>
 
 		<h:form id="form-add-product">
-			<p:panelGrid columns="1" styleClass="table table-full" layout="grid">
+			<p:panelGrid
+				columns="1"
+				layout="grid"
+				>
 				<f:facet name="header">
 					<h:outputText value="#{project.ADMIN_ADD_GENERIC_PRODUCT_TITLE}" />
 				</f:facet>
@@ -257,13 +276,12 @@
 				<f:facet name="footer">
 					<p:panelGrid columns="2" layout="grid">
 						<p:commandButton
-							styleClass="reset"
 							type="reset"
 							value="#{msg.BUTTON_RESET_FORM}"
 							/>
 
 						<p:commandButton
-							styleClass="submit"
+							process="@form"
 							type="submit"
 							value="#{project.BUTTON_ADMIN_ADD_GENERIC_PRODUCT}"
 							action="#{adminProductController.addProduct()}"
diff --git a/web/admin/generic_product/admin_generic_product_show.xhtml b/web/admin/generic_product/admin_generic_product_show.xhtml
index ffa1deca..796bc376 100644
--- a/web/admin/generic_product/admin_generic_product_show.xhtml
+++ b/web/admin/generic_product/admin_generic_product_show.xhtml
@@ -1,16 +1,17 @@
 <?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:ui="http://xmlns.jcp.org/jsf/facelets"
-				xmlns:h="http://xmlns.jcp.org/jsf/html"
-				xmlns:f="http://xmlns.jcp.org/jsf/core"
-				xmlns:p="http://primefaces.org/ui"
-				>
+<ui:composition
+	template="/WEB-INF/templates/admin/admin_base.tpl"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+	xmlns:h="http://xmlns.jcp.org/jsf/html"
+	xmlns:f="http://xmlns.jcp.org/jsf/core"
+	xmlns:p="http://primefaces.org/ui"
+	>
 
 	<ui:define name="metadata">
 		<f:metadata>
 			<f:viewParam id="productId" name="productId" value="#{productBeanHelper.product}" converter="GenericProductConverter" required="true" requiredMessage="#{project.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}" converterMessage="#{project.PARAMETER_PRODUCT_ID_INVALID}" />
-			<f:viewAction onPostback="true" action="#{productBeanHelper.notifyControllerProductConverted()}" />
+			<f:viewAction action="#{productBeanHelper.notifyControllerProductConverted()}" />
 		</f:metadata>
 	</ui:define>
 
diff --git a/web/admin/product_category/admin_product_category_list.xhtml b/web/admin/product_category/admin_product_category_list.xhtml
index 0b90adf1..8e52a3ad 100644
--- a/web/admin/product_category/admin_product_category_list.xhtml
+++ b/web/admin/product_category/admin_product_category_list.xhtml
@@ -1,11 +1,13 @@
 <?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:product-links="http://mxchange.org/jsf/jproduct/links"
-				xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-				xmlns:h="http://xmlns.jcp.org/jsf/html"
-				xmlns:f="http://xmlns.jcp.org/jsf/core"
-				xmlns:p="http://primefaces.org/ui">
+<ui:composition
+	template="/WEB-INF/templates/admin/admin_base.tpl"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:product-links="http://mxchange.org/jsf/jproduct/links"
+	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+	xmlns:h="http://xmlns.jcp.org/jsf/html"
+	xmlns:f="http://xmlns.jcp.org/jsf/core"
+	xmlns:p="http://primefaces.org/ui"
+	>
 
 	<ui:define name="document_admin_title">
 		<h:outputText value="#{project.PAGE_TITLE_ADMIN_LIST_PRODUCT_CATEGORY}" />
@@ -21,7 +23,6 @@
 				id="categoryList"
 				var="category"
 				value="#{categoryListController.allCategories}"
-				tableStyleClass="table table-full"
 				paginator="true"
 				paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
 				filteredValue="#{categoryListController.filteredCategories}"
@@ -43,14 +44,26 @@
 					<p:panelGrid columns="3" layout="grid" columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2">
 						<p:spacer />
 
-						<p:panelGrid columns="2" columnClasses="ui-grid-4,ui-grid-8" layout="grid" styleClass="table table-full ui-noborder">
+						<p:panelGrid
+							columns="2"
+							columnClasses="ui-grid-4,ui-grid-8"
+							layout="grid"
+							styleClass="ui-noborder"
+							>
 							<p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
 							<p:inputText id="globalFilter" onkeyup="PF('categoryList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
 						</p:panelGrid>
 
 						<p:outputPanel>
 							<p:spacer height="4" />
-							<p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
+
+							<p:commandButton
+								id="toggler"
+								type="button"
+								value="#{msg.SELECT_SHOWN_COLUMNS}"
+								styleClass="column-selector"
+								/>
+
 							<p:columnToggler datasource="categoryList" trigger="toggler" />
 						</p:outputPanel>
 					</p:panelGrid>
@@ -68,7 +81,7 @@
 					</p:link>
 				</p:column>
 
-				<p:column headerText="#{msg.ADMIN_I18N_KEY_HEADER}" sortBy="#{category.categoryI18nKey}" filterBy="#{category.categoryI18nKey}" filterMatchMode="contains">
+				<p:column headerText="#{msg.ADMIN_I18N_KEY_HEADER}" sortBy="#{local[category.categoryI18nKey]}" filterBy="#{local[category.categoryI18nKey]}" filterMatchMode="contains">
 					<h:outputText value="#{local[category.categoryI18nKey]}" title="#{category.categoryI18nKey}" />
 				</p:column>
 
@@ -97,8 +110,8 @@
 				</p:column>
 
 				<p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{category.categoryCreated}" filterable="false">
-					<h:outputText id="categoryCreated" value="#{category.categoryCreated.time}">
-						<f:convertDateTime for="categoryCreated" type="both" timeStyle="short" dateStyle="short" />
+					<h:outputText id="categoryCreated" value="#{category.categoryCreated}">
+						<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
 					</h:outputText>
 				</p:column>
 
@@ -115,11 +128,11 @@
 				hideEffect="fade"
 				showEffect="fade"
 				widgetVar="categoryDialog"
-				position="center,center"
+				position="top"
 				responsive="true"
 				>
 				<p:outputPanel id="category-details">
-					<p:panelGrid columns="2" rendered="#{not empty categoryListController.selectedCategory}" columnClasses="label,value">
+					<p:panelGrid columns="2" rendered="#{not empty categoryListController.selectedCategory}">
 						<f:facet name="header">
 							<h:outputFormat value="#{project.ADMIN_CATEGORY_DETAILS_HEADER}">
 								<f:param value="#{local[categoryListController.selectedCategory.categoryI18nKey]}" />
@@ -143,7 +156,7 @@
 						<h:outputText value="#{project.CATEGORY_HAS_NO_PARENT}" rendered="#{empty categoryListController.selectedCategory.parentCategory}" />
 
 						<p:outputLabel value="#{msg.ENTRY_CREATED_HEADER}" title="#{project.ADMIN_CATEGORY_ENTRY_CREATED_TITLE}" />
-						<h:outputText value="#{categoryListController.selectedCategory.categoryCreated.time}">
+						<h:outputText value="#{categoryListController.selectedCategory.categoryCreated}">
 							<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
 						</h:outputText>
 					</p:panelGrid>
@@ -152,7 +165,10 @@
 		</h:form>
 
 		<h:form id="form-add-category">
-			<p:panelGrid columns="1" styleClass="table table-full" layout="grid">
+			<p:panelGrid
+				columns="1"
+				layout="grid"
+				>
 				<f:facet name="header">
 					<h:outputText value="#{project.ADMIN_ADD_PRODUCT_CATEGORY_TITLE}" />
 				</f:facet>
@@ -166,13 +182,12 @@
 				<f:facet name="footer">
 					<p:panelGrid columns="2" layout="grid">
 						<p:commandButton
-							styleClass="reset"
 							type="reset"
 							value="#{msg.BUTTON_RESET_FORM}"
 							/>
 
 						<p:commandButton
-							styleClass="submit"
+							process="@form"
 							type="submit"
 							value="#{project.BUTTON_ADMIN_ADD_PRODUCT_CATEGORY}"
 							action="#{adminCategoryController.addCategory()}"
-- 
2.39.5