*/
private Category createCategoryInstance () {
// Create category
- final Category category = new ProductCategory(this.getCategoryI18nKey(), this.getCategoryShownInStatistics());
+ final Category category = new ProductCategory(
+ this.getCategoryI18nKey(),
+ this.getCategoryShownInStatistics()
+ );
// Set all optional fields
category.setParentCategory(this.getParentCategory());
ERROR_PRODUCT_FSC_NUMBER_NOT_VALID=Fehler: FSC-Nummer des Produktes entspricht nicht dem Format: Cxxxxxx
#@TODO Please fix German umlauts!
ADMIN_GENERIC_PRODUCT_NOT_UPDATED=Sie haben keine Aenderungen am dem Produkt vorgenommen.
+ADMIN_PRODUCT_FSC_NUMBER_HEADER=FSC-Nummer:
+PRODUCT_FSC_NUMBER_TITLE=The FSC-Nummer des Produktes.
ADMIN_ENTER_GENERIC_PRODUCT_FSC_NUMBER_TITLE=Enter product's FSC number with leading C and 6 digits.
ERROR_PRODUCT_FSC_NUMBER_NOT_VALID=Error: FSC number not valid format: Cxxxxxx
ADMIN_GENERIC_PRODUCT_NOT_UPDATED=You have not changed any product data.
+ADMIN_PRODUCT_FSC_NUMBER_HEADER=FSC number:
+PRODUCT_FSC_NUMBER_TITLE=The FSC number of the product.
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (C) 2017 - 2020 Free Software Foundation
-
-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/jproduct/widgets</namespace>
- <tag>
- <tag-name>inputProductPricePanelGrid</tag-name>
- <description>This tag renders input fields for creating a price panel grid for product prices.</description>
- <source>resources/tags/input/panel_grid/generic_product/product_price_input_panel_grid.tpl</source>
- <attribute>
- <name>rendered</name>
- <description>Whether this tag is being rendered by JSF engine (default: true).</description>
- <required>false</required>
- <type>java.lang.Boolean</type>
- </attribute>
- <attribute>
- <name>targetController</name>
- <description>A target backing bean (EL code resolving into it) extending at least BaseFacesBean where to set the data in.</description>
- <required>true</required>
- <!-- @TODO Find an interface for BaseFacesBean and set it here instead -->
- <type>org.mxchange.jcoreee.bean.faces.BaseFacesBean</type>
- </attribute>
- </tag>
-</facelet-taglib>
+++ /dev/null
-<?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"
- >
-
- <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="#{product.ENTER_NET_PRICE}" />
-
- <p:outputLabel for="productTaxRate" value="#{product.ENTER_TAX_RATE}" />
-
- <p:outputLabel for="productGrossPrice" value="#{product.ENTER_GROSS_PRICE}" />
-
- <p:inputNumber
- id="productNetPrice"
- title="#{product.ENTER_PRODUCT_NET_PRICE_TITLE}"
- value="#{targetController.productNetPrice}"
- symbol=" EUR"
- symbolPosition="s"
- decimalSeparator=","
- thousandSeparator="."
- >
- </p:inputNumber>
-
- <p:inputNumber
- id="productTaxRate"
- title="#{product.ENTER_PRODUCT_TAX_RATE_TITLE}"
- value="#{targetController.productTaxRate}"
- symbol="%"
- symbolPosition="s"
- thousandSeparator="."
- decimalSeparator=","
- emptyValue="sign"
- >
- <f:validateDoubleRange minimum="0" maximum="100" />
- </p:inputNumber>
-
- <p:inputNumber
- id="productGrossPrice"
- title="#{product.ENTER_PRODUCT_GROSS_PRICE_TITLE}"
- value="#{targetController.productGrossPrice}"
- symbol=" EUR"
- symbolPosition="s"
- decimalSeparator=","
- thousandSeparator="."
- required="true"
- requiredMessage="#{product.PRODUCT_GROSS_PRICE_REQUIRED}"
- >
- </p:inputNumber>
- </p:panelGrid>
-</ui:composition>
<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
- 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"
/>
<p:outputLabel value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_PRICE}" />
- <product:inputProductPricePanelGrid targetController="#{adminGenericProductActionController}" />
+ <ui:include src="/WEB-INF/templates/admin/generic_product/admin_product_price_input_panel_grid.tpl" />
<p:outputLabel for="productCurrencyCode" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE}" />
<p:inputText
size="20"
minValue="0.001"
maxValue="20000.000"
- decimalSeparator=","
- thousandSeparator="."
title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT_TITLE}"
required="true"
requiredMessage="#{product.ADMIN_PRODUCT_UNIT_AMOUNT_REQUIRED}"
--- /dev/null
+<?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: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="ui-noborder"
+ rendered="#{empty rendered or rendered == true}"
+ >
+ <p:outputLabel for="productNetPrice" value="#{product.ENTER_NET_PRICE}" />
+
+ <p:outputLabel for="productTaxRate" value="#{product.ENTER_TAX_RATE}" />
+
+ <p:outputLabel for="productGrossPrice" value="#{product.ENTER_GROSS_PRICE}" />
+
+ <p:inputNumber
+ id="productNetPrice"
+ title="#{product.ENTER_PRODUCT_NET_PRICE_TITLE}"
+ value="#{adminGenericProductActionController.productNetPrice}"
+ symbol=" EUR"
+ symbolPosition="s"
+ />
+
+ <p:inputNumber
+ id="productTaxRate"
+ title="#{product.ENTER_PRODUCT_TAX_RATE_TITLE}"
+ value="#{adminGenericProductActionController.productTaxRate}"
+ symbol="%"
+ symbolPosition="s"
+ emptyValue="focus"
+ minValue="0"
+ maxValue="100"
+ />
+
+ <p:inputNumber
+ id="productGrossPrice"
+ title="#{product.ENTER_PRODUCT_GROSS_PRICE_TITLE}"
+ value="#{adminGenericProductActionController.productGrossPrice}"
+ symbol=" EUR"
+ symbolPosition="s"
+ required="true"
+ requiredMessage="#{product.PRODUCT_GROSS_PRICE_REQUIRED}"
+ />
+ </p:panelGrid>
+</ui:composition>
<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/validators.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml;/WEB-INF/project-links.jsf.taglib.xml;/WEB-INF/product.jsf.taglib.xml;/WEB-INF/product-links.jsf.taglib.xml</param-value>
+ <param-value>/WEB-INF/widgets.jsf.taglib.xml;/WEB-INF/validators.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml;/WEB-INF/project-links.jsf.taglib.xml;;/WEB-INF/product-links.jsf.taglib.xml</param-value>
</context-param>
<context-param>
<description>Project stage</description>
<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"
<h:outputText value="-" rendered="#{empty genericProduct.productNumber}" />
</p:column>
+ <p:column
+ headerText="#{product.ADMIN_PRODUCT_FSC_NUMBER_HEADER}"
+ sortBy="#{genericProduct.productFscNumber}"
+ filterBy="#{genericProduct.productFscNumber}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{genericProduct.productFscNumber}" rendered="#{not empty genericProduct.productFscNumber}" />
+ <h:outputText value="-" rendered="#{empty genericProduct.productFscNumber}" />
+ </p:column>
+
<p:column
headerText="#{product.ADMIN_PRODUCT_BARCODE_HEADER}"
sortBy="#{genericProduct.productBarCodeNumber}"
<h:outputText value="#{product.PRODUCT_NO_BARCODE_NUMBER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productBarCodeNumber}" />
<p:barcode format="svg" width="100%" type="#{initParam['product_barcode_type']}" value="#{productListController.selectedProduct.productBarCodeNumber}" rendered="#{not empty productListController.selectedProduct.productBarCodeNumber}" />
+ <p:outputLabel value="#{product.ADMIN_PRODUCT_FSC_NUMBER_HEADER}" title="#{product.PRODUCT_FSC_NUMBER_TITLE}" />
+ <h:outputText value="#{productListController.selectedProduct.productFscNumber}" />
+
<p:outputLabel value="#{msg.AVAILABLE_HEADER}" title="#{product.PRODUCT_AVAILABILITY_TITLE}" />
<h:outputText value="#{productListController.selectedProduct.productAvailability ? msg.CHOICE_YES : msg.CHOICE_NO}" />
<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"
<p:column
headerText="#{msg.ENTRY_CREATED_HEADER}"
- sortBy="#{category.categoryCreated}"
+ sortBy="#{category.categoryEntryCreated}"
filterable="false"
>
- <h:outputText id="categoryCreated" value="#{category.categoryCreated}">
+ <h:outputText value="#{category.categoryEntryCreated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+ </h:outputText>
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ENTRY_UPDATED_HEADER}"
+ sortBy="#{category.categoryEntryUpdated}"
+ filterable="false"
+ >
+ <h:outputText value="#{category.categoryEntryUpdated}">
<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
</p:column>
<h:outputText value="#{product.CATEGORY_HAS_NO_PARENT}" rendered="#{empty categoryListController.selectedCategory.parentCategory}" />
<p:outputLabel value="#{msg.ENTRY_CREATED_HEADER}" title="#{product.ADMIN_CATEGORY_ENTRY_CREATED_TITLE}" />
- <h:outputText value="#{categoryListController.selectedCategory.categoryCreated}">
+ <h:outputText value="#{categoryListController.selectedCategory.categoryEntryCreated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+ </h:outputText>
+
+ <p:outputLabel value="#{msg.ENTRY_UPDATED_HEADER}" title="#{product.ADMIN_CATEGORY_ENTRY_UPDATED_TITLE}" />
+ <h:outputText value="#{categoryListController.selectedCategory.categoryEntryUpdated}">
<f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
</p:panelGrid>