From: Roland Häder <roland@mxchange.org>
Date: Sat, 28 Oct 2017 22:58:32 +0000 (+0200)
Subject: Maybe cherry-pick:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=496ca99bef2c1903a98a114caca3f87fd5bfdd03;p=jfinancials-war.git

Maybe cherry-pick:
- registered product taglib with web.xml (ops)
- added title attributes to p:inputNumber tags for entering product price
- needed to add thousandSeparator attribute as it will default to ',' which is
  maybe not valid/wanted in all languages (e.g. German language as a '.' as
  thousand separator and ',' for decimal seperation)
- this has also fixed a JavaScript error causing some malfunction in views
- labels are now shown correctly above each p:inputNumber field (product price)

Signed-off-by: Roland Häder <roland@mxchange.org>
---

diff --git a/web/WEB-INF/resources/tags/input/panel_grid/product/product_price_input_panel_grid.tpl b/web/WEB-INF/resources/tags/input/panel_grid/product/product_price_input_panel_grid.tpl
index 158d257c..4dfc5447 100644
--- a/web/WEB-INF/resources/tags/input/panel_grid/product/product_price_input_panel_grid.tpl
+++ b/web/WEB-INF/resources/tags/input/panel_grid/product/product_price_input_panel_grid.tpl
@@ -1,14 +1,21 @@
 <?xml version="1.0" encoding="UTF-8" ?>
+<!-- @TODO Hard-coded values below -->
 <ui:composition
 	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">
 
-	<!-- @TODO Hard-coded values below -->
-	<p:panelGrid layout="grid" columns="3" styleClass="table table-full ui-noborder" rendered="#{empty rendered or rendered == true}">
+	<p:panelGrid layout="grid" columns="3" columnClasses="ui-grid-col-5,ui-grid-col-2,ui-grid-col-5" styleClass="table table-full 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}" />
+
+		<p:outputLabel for="productGrossPrice" value="#{project.ENTER_GROSS_PRICE}" />
+
 		<p:inputNumber
 			id="productNetPrice"
+			title="#{project.ENTER_PRODUCT_NET_PRICE_TITLE}"
 			value="#{targetController.productNetPrice}"
 			symbol=" EUR"
 			symbolPosition="s"
@@ -19,9 +26,11 @@
 
 		<p:inputNumber
 			id="productTaxRate"
+			title="#{project.ENTER_PRODUCT_TAX_RATE_TITLE}"
 			value="#{targetController.productTaxRate}"
 			symbol="%"
 			symbolPosition="s"
+			thousandSeparator="."
 			decimalSeparator=","
 			emptyValue="sign"
 			>
@@ -30,13 +39,14 @@
 
 		<p:inputNumber
 			id="productGrossPrice"
+			title="#{project.ENTER_PRODUCT_GROSS_PRICE_TITLE}"
 			value="#{targetController.productGrossPrice}"
 			symbol=" EUR"
 			symbolPosition="s"
 			decimalSeparator=","
 			thousandSeparator="."
 			required="true"
-			requiredMessage="#{project.ADMIN_PRODUCT_GROSS_PRICE_REQUIRED}"
+			requiredMessage="#{project.PRODUCT_GROSS_PRICE_REQUIRED}"
 			>
 		</p:inputNumber>
 	</p:panelGrid>
diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml
index e355a26a..dbce861c 100644
--- a/web/WEB-INF/web.xml
+++ b/web/WEB-INF/web.xml
@@ -30,7 +30,7 @@
     <context-param>
         <description>Generic custom JSF tags library</description>
         <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
-        <param-value>/WEB-INF/widgets.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml;/WEB-INF/project-links.jsf.taglib.xml</param-value>
+        <param-value>/WEB-INF/widgets.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml;/WEB-INF/project-links.jsf.taglib.xml;/WEB-INF/product.jsf.taglib.xml</param-value>
     </context-param>
     <context-param>
         <description>Project stage</description>