]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Wed, 8 Apr 2020 18:39:21 +0000 (20:39 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 8 Apr 2020 18:39:21 +0000 (20:39 +0200)
- renamed adminGenericProductActionController.product ->
  adminGenericProductActionController.currentProduct
- p:message is here not required as p:growl does the job nicely already
- reformatted p:outputLabel/p:inputText to have each attribute in separate line

Signed-off-by: Roland Häder <roland@mxchange.org>
web/WEB-INF/product.jsf.taglib.xml
web/WEB-INF/resources/tags/forms/generic_product/admin_form_generic_product_data.tpl [deleted file]
web/WEB-INF/templates/admin/generic_product/admin_form_generic_product_data.tpl [new file with mode: 0644]
web/admin/generic_product/admin_generic_product_delete.xhtml
web/admin/generic_product/admin_generic_product_edit.xhtml
web/admin/generic_product/admin_generic_product_list.xhtml
web/admin/generic_product/admin_generic_product_show.xhtml
web/admin/product_category/admin_product_category_list.xhtml

index 420bc19a9646697bbe5df1ca4d3ec26e82d34ae8..d9254e25f616b4e9c4446c6325683432b51bce39 100644 (file)
@@ -40,22 +40,4 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                        <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>
diff --git a/web/WEB-INF/resources/tags/forms/generic_product/admin_form_generic_product_data.tpl b/web/WEB-INF/resources/tags/forms/generic_product/admin_form_generic_product_data.tpl
deleted file mode 100644 (file)
index 69bd117..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-<?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>
diff --git a/web/WEB-INF/templates/admin/generic_product/admin_form_generic_product_data.tpl b/web/WEB-INF/templates/admin/generic_product/admin_form_generic_product_data.tpl
new file mode 100644 (file)
index 0000000..3d0c823
--- /dev/null
@@ -0,0 +1,175 @@
+<?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>
index 20c7a40bade774fecd1bfe47c3c6d2bcda70411c..0aba7fc3b689e50cfe84c66b628748a56c312189 100644 (file)
@@ -13,7 +13,7 @@
                        <f:viewParam
                                id="productId"
                                name="productId"
-                               value="#{adminGenericProductActionController.product}"
+                               value="#{adminGenericProductActionController.currentProduct}"
                                converter="GenericProductConverter"
                                required="true"
                                requiredMessage="#{product.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}"
index 3841ebbbc44f6c8abd82db7b07d75ec1bc2e6f0a..3974b99d0427a49b7eb6dd42bd7ec72fc9bdd497 100644 (file)
@@ -2,7 +2,6 @@
 <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"
@@ -12,9 +11,8 @@
        <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
@@ -52,9 +44,9 @@
                                <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">
index 6a2775d9370d029d9806a422230b886e1d7bb387..77c97c081642979bb5ade793d0f7db218bb96bc0 100644 (file)
@@ -2,7 +2,6 @@
 <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>
index 3069dcb18fdb7602f4cd95605554b28e0ba9f37e..0a73f314d38abdec1269856d9e4763cfe52c42d9 100644 (file)
@@ -13,7 +13,7 @@
                        <f:viewParam
                                id="productId"
                                name="productId"
-                               value="#{adminGenericProductActionController.product}"
+                               value="#{adminGenericProductActionController.currentProduct}"
                                converter="GenericProductConverter"
                                required="true"
                                requiredMessage="#{product.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}"
index 9a60a8436039f77d859b3dd3c2cdb43e18f633ae..4dc6d579a7c6c4573bfde3ea60133625de9d2b9b 100644 (file)
                                >
 
                                <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>