<type>org.mxchange.jcoreee.bean.faces.BaseFacesBean</type>
</attribute>
</tag>
- <tag>
- <tag-name>genericProductForm</tag-name>
- <description>A tag for generic product forms.</description>
- <source>resources/tags/forms/generic_product/admin_form_generic_product_data.tpl</source>
- <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>
- <attribute>
- <name>allowDuplicates</name>
- <description>Whether to allow duplicate i18n keys.</description>
- <required>false</required>
- <type>java.lang.Boolean</type>
- </attribute>
- </tag>
</facelet-taglib>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-@TODO: title="#{product.ADMIN_GENERIC_PRODUCT_DATA_LEGEND_TITLE}"
--->
-<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:fieldset legend="#{product.ADMIN_GENERIC_PRODUCT_DATA_LEGEND}">
- <p:panelGrid
- layout="grid"
- columns="2"
- columnClasses="ui-grid-col-4,ui-grid-col-8"
- styleClass="ui-noborder"
- >
- <p:outputLabel for="productCategory" value="#{product.ADMIN_ASSIGN_PRODUCT_CATEGORY}" />
- <p:selectOneMenu
- id="productCategory"
- value="#{targetController.productCategory}"
- filter="true"
- filterMatchMode="contains"
- required="true"
- requiredMessage="#{product.ADMIN_PRODUCT_CATEGORY_REQUIRED}"
- title="#{product.ADMIN_ASSIGN_PRODUCT_CATEGORY_TITLE}"
- >
-
- <f:converter converterId="ProductCategoryConverter" />
-
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
-
- <f:selectItems
- value="#{categoryListController.allCategories}"
- var="category"
- itemValue="#{category}"
- itemLabel="#{productBeanHelper.renderProductCategory(category)}"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="productI18nKey" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY}" />
- <p:inputText
- id="productI18nKey"
- value="#{targetController.productI18nKey}"
- maxlength="255"
- required="true"
- requiredMessage="#{product.ADMIN_PRODUCT_I18N_KEY_REQUIRED}"
- title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY_TITLE}"
- validatorMessage="#{product.ADMIN_ENTERED_PRODUCT_I18N_KEY_ALREADY_ADDED}"
- >
- <f:validator validatorId="GenericProductValidator" />
- <f:attribute name="allowDuplicates" value="#{allowDuplicates}" />
- </p:inputText>
-
- <p:outputLabel for="productNumber" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_NUMBER}" />
- <p:inputText
- id="productNumber"
- value="#{targetController.productNumber}"
- size="20"
- maxlength="20"
- title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_NUMBER_TITLE}"
- />
-
- <p:outputLabel for="productBarCodeNumber" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_BARCODE_NUMBER}" />
- <p:inputText
- id="productBarCodeNumber"
- value="#{targetController.productBarCodeNumber}"
- size="30"
- maxlength="255"
- title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_BARCODE_NUMBER_TITLE}"
- />
-
- <p:outputLabel for="productAgeGroup" value="#{product.ADMIN_SELECT_PRODUCT_AGE_GROUP}" />
- <p:selectOneMenu
- id="productAgeGroup"
- value="#{targetController.productAgeGroup}"
- filter="true"
- filterMatchMode="contains"
- title="#{product.ADMIN_SELECT_PRODUCT_AGE_GROUP_TITLE}"
- >
-
- <f:converter converterId="AgeGroupConverter" />
-
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-
- <f:selectItems
- value="#{dataController.ageGroups}"
- var="ageGroup"
- itemValue="#{ageGroup}"
- itemLabel="#{project[ageGroup.i18nKey]}"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="productSize" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_SIZE}" />
- <p:inputText
- id="productSize"
- value="#{targetController.productSize}"
- size="5"
- maxlength="10"
- title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_SIZE_TITLE}"
- />
-
- <p:outputLabel for="productManufacturer" value="#{product.ADMIN_ASSIGN_PRODUCT_MANUFACTURER}" />
- <p:selectOneMenu
- id="productManufacturer"
- value="#{targetController.productManufacturer}"
- filter="true"
- filterMatchMode="contains"
- title="#{product.ADMIN_ASSIGN_PRODUCT_MANUFACTURER_TITLE}"
- >
-
- <f:converter converterId="BasicCompanyDataConverter" />
-
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-
- <f:selectItems
- value="#{basicDataListController.allBasicData}"
- var="basicData"
- itemValue="#{basicData}"
- itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
- />
- </p:selectOneMenu>
-
- <p:outputLabel for="productAvailability" value="#{product.ADMIN_ENABLE_PRODUCT_AVAILABILITY}" />
- <p:selectBooleanCheckbox
- id="productAvailability"
- value="#{targetController.productAvailability}"
- required="true"
- requiredMessage="#{product.ADMIN_GENERIC_PRODUCT_AVAILABILITY_REQUIRED}"
- title="#{product.ADMIN_ENABLE_PRODUCT_AVAILABILITY_TITLE}"
- />
-
- <p:outputLabel value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_PRICE}" />
- <product:inputProductPricePanelGrid targetController="#{targetController}" />
-
- <p:outputLabel for="productCurrencyCode" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE}" />
- <p:inputText
- id="productCurrencyCode"
- value="#{targetController.productCurrencyCode}"
- size="3"
- maxlength="3"
- title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE_TITLE}"
- required="true"
- requiredMessage="#{product.ADMIN_PRODUCT_CURRENCY_CODE_REQUIRED}"
- />
-
- <p:outputLabel for="productUnitAmount" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT}" />
- <p:inputNumber
- id="productUnitAmount"
- value="#{targetController.productUnitAmount}"
- 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}"
- />
-
- <p:outputLabel for="productUnitI18nKey" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY}" />
- <p:inputText
- id="productUnitI18nKey"
- value="#{targetController.productUnitI18nKey}"
- size="20"
- maxlength="255"
- title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE}"
- required="true"
- requiredMessage="#{product.ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED}"
- />
- </p:panelGrid>
- </p:fieldset>
-</ui:composition>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+@TODO: title="#{product.ADMIN_GENERIC_PRODUCT_DATA_LEGEND_TITLE}"
+-->
+<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:fieldset legend="#{product.ADMIN_GENERIC_PRODUCT_DATA_LEGEND}">
+ <p:panelGrid
+ layout="grid"
+ columns="2"
+ columnClasses="ui-grid-col-4,ui-grid-col-8"
+ styleClass="ui-noborder"
+ >
+ <p:outputLabel for="productCategory" value="#{product.ADMIN_ASSIGN_PRODUCT_CATEGORY}" />
+ <p:selectOneMenu
+ id="productCategory"
+ value="#{adminGenericProductActionController.productCategory}"
+ filter="true"
+ filterMatchMode="contains"
+ required="true"
+ requiredMessage="#{product.ADMIN_PRODUCT_CATEGORY_REQUIRED}"
+ title="#{product.ADMIN_ASSIGN_PRODUCT_CATEGORY_TITLE}"
+ >
+
+ <f:converter converterId="ProductCategoryConverter" />
+
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.PLEASE_SELECT}" noSelectionOption="true" itemDisabled="true" />
+
+ <f:selectItems
+ value="#{categoryListController.allCategories}"
+ var="category"
+ itemValue="#{category}"
+ itemLabel="#{productBeanHelper.renderProductCategory(category)}"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="productI18nKey" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY}" />
+ <p:inputText
+ id="productI18nKey"
+ value="#{adminGenericProductActionController.productI18nKey}"
+ maxlength="255"
+ required="true"
+ requiredMessage="#{product.ADMIN_PRODUCT_I18N_KEY_REQUIRED}"
+ title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_I18N_KEY_TITLE}"
+ validatorMessage="#{product.ADMIN_ENTERED_PRODUCT_I18N_KEY_ALREADY_ADDED}"
+ >
+ <f:validator validatorId="GenericProductValidator" />
+ <f:attribute name="allowDuplicates" value="#{allowDuplicates}" />
+ </p:inputText>
+
+ <p:outputLabel for="productNumber" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_NUMBER}" />
+ <p:inputText
+ id="productNumber"
+ value="#{adminGenericProductActionController.productNumber}"
+ size="20"
+ maxlength="20"
+ title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_NUMBER_TITLE}"
+ />
+
+ <p:outputLabel for="productBarCodeNumber" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_BARCODE_NUMBER}" />
+ <p:inputText
+ id="productBarCodeNumber"
+ value="#{adminGenericProductActionController.productBarCodeNumber}"
+ size="30"
+ maxlength="255"
+ title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_BARCODE_NUMBER_TITLE}"
+ />
+
+ <p:outputLabel for="productAgeGroup" value="#{product.ADMIN_SELECT_PRODUCT_AGE_GROUP}" />
+ <p:selectOneMenu
+ id="productAgeGroup"
+ value="#{adminGenericProductActionController.productAgeGroup}"
+ filter="true"
+ filterMatchMode="contains"
+ title="#{product.ADMIN_SELECT_PRODUCT_AGE_GROUP_TITLE}"
+ >
+
+ <f:converter converterId="AgeGroupConverter" />
+
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+ <f:selectItems
+ value="#{dataController.ageGroups}"
+ var="ageGroup"
+ itemValue="#{ageGroup}"
+ itemLabel="#{project[ageGroup.i18nKey]}"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="productSize" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_SIZE}" />
+ <p:inputText
+ id="productSize"
+ value="#{adminGenericProductActionController.productSize}"
+ size="5"
+ maxlength="10"
+ title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_SIZE_TITLE}"
+ />
+
+ <p:outputLabel for="productManufacturer" value="#{product.ADMIN_ASSIGN_PRODUCT_MANUFACTURER}" />
+ <p:selectOneMenu
+ id="productManufacturer"
+ value="#{adminGenericProductActionController.productManufacturer}"
+ filter="true"
+ filterMatchMode="contains"
+ title="#{product.ADMIN_ASSIGN_PRODUCT_MANUFACTURER_TITLE}"
+ >
+
+ <f:converter converterId="BasicCompanyDataConverter" />
+
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+
+ <f:selectItems
+ value="#{basicDataListController.allBasicData}"
+ var="basicData"
+ itemValue="#{basicData}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ />
+ </p:selectOneMenu>
+
+ <p:outputLabel for="productAvailability" value="#{product.ADMIN_ENABLE_PRODUCT_AVAILABILITY}" />
+ <p:selectBooleanCheckbox
+ id="productAvailability"
+ value="#{adminGenericProductActionController.productAvailability}"
+ required="true"
+ requiredMessage="#{product.ADMIN_GENERIC_PRODUCT_AVAILABILITY_REQUIRED}"
+ title="#{product.ADMIN_ENABLE_PRODUCT_AVAILABILITY_TITLE}"
+ />
+
+ <p:outputLabel value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_PRICE}" />
+ <product:inputProductPricePanelGrid targetController="#{adminGenericProductActionController}" />
+
+ <p:outputLabel for="productCurrencyCode" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE}" />
+ <p:inputText
+ id="productCurrencyCode"
+ value="#{adminGenericProductActionController.productCurrencyCode}"
+ size="3"
+ maxlength="3"
+ title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_CURRENCY_CODE_TITLE}"
+ required="true"
+ requiredMessage="#{product.ADMIN_PRODUCT_CURRENCY_CODE_REQUIRED}"
+ />
+
+ <p:outputLabel for="productUnitAmount" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT}" />
+ <p:inputNumber
+ id="productUnitAmount"
+ value="#{adminGenericProductActionController.productUnitAmount}"
+ 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}"
+ />
+
+ <p:outputLabel for="productUnitI18nKey" value="#{product.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY}" />
+ <p:inputText
+ id="productUnitI18nKey"
+ value="#{adminGenericProductActionController.productUnitI18nKey}"
+ size="20"
+ maxlength="255"
+ title="#{product.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE}"
+ required="true"
+ requiredMessage="#{product.ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED}"
+ />
+ </p:panelGrid>
+ </p:fieldset>
+</ui:composition>
<f:viewParam
id="productId"
name="productId"
- value="#{adminGenericProductActionController.product}"
+ value="#{adminGenericProductActionController.currentProduct}"
converter="GenericProductConverter"
required="true"
requiredMessage="#{product.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}"
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:product="http://mxchange.org/jsf/jproduct/widgets"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
<ui:define name="metadata">
<f:metadata>
<f:viewParam
- id="productId"
name="productId"
- value="#{adminGenericProductActionController.product}"
+ value="#{adminGenericProductActionController.currentProduct}"
converter="GenericProductConverter"
required="true"
requiredMessage="#{product.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}"
</ui:define>
<ui:define name="content">
- <p:message
- for="productId"
- showSummary="true"
- rendered="#{empty adminGenericProductActionController.product}"
- />
-
- <h:form rendered="#{not empty adminGenericProductActionController.product}">
+ <h:form rendered="#{not empty adminGenericProductActionController.currentProduct}">
<h:inputHidden value="#{adminGenericProductActionController.productId}" />
<p:panelGrid
<f:facet name="header">
<h:outputFormat
value="#{product.ADMIN_EDIT_GENERIC_PRODUCT_TITLE}"
- title="#{local[adminGenericProductActionController.product.productI18nKey]}"
+ title="#{local[adminGenericProductActionController.productI18nKey]}"
>
- <f:param value="#{adminGenericProductActionController.product.productId}" />
+ <f:param value="#{adminGenericProductActionController.productId}" />
</h:outputFormat>
</f:facet>
<h:outputText value="#{product.ADMIN_EDIT_GENERIC_PRODUCT_MINIMUM_DATA}" />
</h:panelGroup>
- <product:genericProductForm
- targetController="#{adminGenericProductActionController}"
- allowDuplicates="true"
- />
+ <ui:include src="/WEB-INF/templates/admin/generic_product/admin_form_generic_product_data.tpl" />
<f:facet name="footer">
<p:panelGrid columns="2" layout="grid">
<ui:composition
template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:product="http://mxchange.org/jsf/jproduct/widgets"
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"
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: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>
<h:outputText value="#{product.ADMIN_ADD_GENERIC_PRODUCT_MINIMUM_DATA}" />
</h:panelGroup>
- <product:genericProductForm targetController="#{adminGenericProductController}" />
+ <ui:include src="/WEB-INF/templates/admin/generic_product/admin_form_generic_product_data.tpl" />
<f:facet name="footer">
<p:panelGrid columns="2" layout="grid">
<p:commandButton
type="submit"
value="#{product.BUTTON_ADMIN_ADD_GENERIC_PRODUCT}"
- action="#{adminGenericProductController.addProduct()}"
+ action="#{adminGenericProductActionController.addProduct()}"
update=":master:form-list-products:productList"
/>
</p:panelGrid>
<f:viewParam
id="productId"
name="productId"
- value="#{adminGenericProductActionController.product}"
+ value="#{adminGenericProductActionController.currentProduct}"
converter="GenericProductConverter"
required="true"
requiredMessage="#{product.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}"
>
<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
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:outputLabel
+ for="globalFilter"
+ value="#{msg.SEARCH_ALL_FIELDS}"
+ style="float: right"
+ />
+
+ <p:inputText
+ id="globalFilter"
+ onkeyup="PF('departmentList').filter()"
+ placeholder="#{msg.ENTER_KEYWORD}"
+ />
</p:panelGrid>
<p:outputPanel>