]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Maybe cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 28 Oct 2017 22:58:32 +0000 (00:58 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 28 Oct 2017 22:58:32 +0000 (00:58 +0200)
- 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>
web/WEB-INF/resources/tags/input/panel_grid/product/product_price_input_panel_grid.tpl
web/WEB-INF/web.xml

index 158d257cabf1ffc0829361424f2257cb135bfb94..4dfc54476d0e9f09b59d1d598185b79577784045 100644 (file)
@@ -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"
 
                <p:inputNumber
                        id="productTaxRate"
+                       title="#{project.ENTER_PRODUCT_TAX_RATE_TITLE}"
                        value="#{targetController.productTaxRate}"
                        symbol="%"
                        symbolPosition="s"
+                       thousandSeparator="."
                        decimalSeparator=","
                        emptyValue="sign"
                        >
 
                <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>
index e355a26a672e0ee87ac20e42e2bd4fd9d9ce5fe1..dbce861c592d5c85b01ac24d3b8df585669844a4 100644 (file)
@@ -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>