]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Mon, 14 May 2018 22:49:05 +0000 (00:49 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 14 May 2018 22:53:56 +0000 (00:53 +0200)
- moved > of <ui:composition> to new line to have newly added namspaces being
  added without causing 2 lines being changed
- wrapped long JSF/PF tags having each attribute in a single line
- added size, maxValue and minValue to productUnitAmount
- onPostback has caused some side effect that values got overwritten in e.g.
  edit views
- no longer using tableStyleClass
- changed i18n strings, no need for having PRODUCT_ prefix on e.g. net/gross
  price strings
- no longer using styleClass="submit|reset"
- added process="@form" as a workaround for an exception, according to BalusC
  this is not fixing the actual application's misconfiguration (where which?)

Signed-off-by: Roland Häder <roland@mxchange.org>
12 files changed:
web/WEB-INF/product-links.jsf.taglib.xml
web/WEB-INF/product.jsf.taglib.xml
web/WEB-INF/resources/tags/admin/links/mini/generic_product/admin_generic_product_links.tpl
web/WEB-INF/resources/tags/admin/links/mini/product_category/admin_product_category_links.tpl
web/WEB-INF/resources/tags/input/panel_grid/generic_product/product_price_input_panel_grid.tpl
web/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl
web/WEB-INF/templates/admin/product_category/admin_form_category_data.tpl
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 151b235b65ab5fe7e5f194e65f1a7b17cabd788b..1d587aebab5c7c222fc3c99912e9fcd6252714c3 100644 (file)
@@ -15,10 +15,12 @@ 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">
+<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/links</namespace>
        <tag>
                <tag-name>outputProductCategoryAdminMiniLinks</tag-name>
index bbe8e8d9d978eca21b76e8d4881907f2af2b9cab..a33d611eccd777a65edd379767eaa347765b1c30 100644 (file)
@@ -15,10 +15,12 @@ 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">
+<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>
index 82c8259945f675799fa54498f1bbaaf412f73bc7..4497520c18e140401f301dcf8e7001cae7481b89 100644 (file)
@@ -4,7 +4,8 @@
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:p="http://primefaces.org/ui">
+       xmlns:p="http://primefaces.org/ui"
+       >
 
        <ui:fragment rendered="#{empty rendered or rendered}">
                <ul class="navbar-mini">
index d606bd3b7b2233330df763a1bc31f7bbdfa37e69..81d15a7e4cf6b044bc08464f70d440cd4868a336 100644 (file)
@@ -4,7 +4,8 @@
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:p="http://primefaces.org/ui">
+       xmlns:p="http://primefaces.org/ui"
+       >
 
        <ui:fragment rendered="#{empty rendered or rendered}">
                <ul class="navbar-mini">
index c94e106fb05d1e9907e9d7878d20e6cb673472ab..d01cfbd60c347eb18371103fde3016fad3a6b8b5 100644 (file)
@@ -4,9 +4,16 @@
        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">
+       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="table table-full ui-noborder" rendered="#{empty rendered or rendered == true}">
+       <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="#{project.ENTER_NET_PRICE}" />
 
                <p:outputLabel for="productTaxRate" value="#{project.ENTER_TAX_RATE}" />
index 3e6288b6d9da21fe82e1d9a10f1ebfaf8b0c6285..4a481e7b2b37ea29df39cc4dce535d6a7ff9e6c6 100644 (file)
@@ -7,10 +7,17 @@
        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">
+       xmlns:p="http://primefaces.org/ui"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       >
 
        <p:fieldset legend="#{project.ADMIN_GENERIC_PRODUCT_DATA_LEGEND}">
-               <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4,ui-grid-col-8" styleClass="table table-full ui-noborder">
+               <p:panelGrid
+                       layout="grid"
+                       columns="2"
+                       columnClasses="ui-grid-col-4,ui-grid-col-8"
+                       styleClass="ui-noborder"
+                       >
                        <p:outputLabel for="productCategory" value="#{project.ADMIN_ASSIGN_PRODUCT_CATEGORY}" />
                        <p:selectOneMenu
                                id="productCategory"
                        <p:inputNumber
                                id="productUnitAmount"
                                value="#{adminProductController.productUnitAmount}"
+                               size="20"
+                               minValue="0.001"
+                               maxValue="20000.000"
                                decimalSeparator=","
                                thousandSeparator="."
                                title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_AMOUNT_TITLE}"
                                />
 
                        <p:outputLabel for="productUnitI18nKey" value="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY}" />
-                       <p:inputText
-                               id="productUnitI18nKey"
-                               value="#{adminProductController.productUnitI18nKey}"
-                               size="20"
-                               maxlength="255"
-                               title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE}"
-                               required="true"
-                               requiredMessage="#{project.ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED}"
+                               <p:inputText
+                                       id="productUnitI18nKey"
+                                       value="#{adminProductController.productUnitI18nKey}"
+                                       size="20"
+                                       maxlength="255"
+                                       title="#{project.ADMIN_ENTER_GENERIC_PRODUCT_UNIT_I18N_KEY_TITLE}"
+                                       required="true"
+                                       requiredMessage="#{project.ADMIN_PRODUCT_UNIT_I18N_KEY_REQUIRED}"
                                />
-               </p:panelGrid>
+                       </p:panelGrid>
        </p:fieldset>
 </ui:composition>
index 19b2d1cade1384da349475ca4554193ce0229a27..e5473bd466feb558bd4a95a9f25bef3c6996b789 100644 (file)
@@ -6,10 +6,16 @@
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:p="http://primefaces.org/ui">
+       xmlns:p="http://primefaces.org/ui"
+       >
 
        <p:fieldset legend="#{project.ADMIN_PRODUCT_CATEGORY_DATA_LEGEND}">
-               <p:panelGrid layout="grid" columns="2" columnClasses="ui-grid-col-4,ui-grid-col-8" styleClass="table table-full ui-noborder">
+               <p:panelGrid
+                       layout="grid"
+                       columns="2"
+                       columnClasses="ui-grid-col-4,ui-grid-col-8"
+                       styleClass="ui-noborder"
+                       >
                        <p:outputLabel for="parentCategory" value="#{project.ADMIN_ASSIGN_PARENT_CATEGORY}" />
                        <p:selectOneMenu
                                id="parentCategory"
index a04b5106509a99788d6f2784106ca7824b8d3602..c137ac6a3f8dde8a156bd86bc41a7b848645c7e4 100644 (file)
@@ -1,16 +1,17 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
-                               xmlns="http://www.w3.org/1999/xhtml"
-                               xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-                               xmlns:h="http://xmlns.jcp.org/jsf/html"
-                               xmlns:f="http://xmlns.jcp.org/jsf/core"
-                               xmlns:p="http://primefaces.org/ui"
-                               >
+<ui:composition
+       template="/WEB-INF/templates/admin/admin_base.tpl"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:p="http://primefaces.org/ui"
+       >
 
        <ui:define name="metadata">
                <f:metadata>
                        <f:viewParam id="productId" name="productId" value="#{productBeanHelper.product}" converter="GenericProductConverter" required="true" requiredMessage="#{project.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}" converterMessage="#{project.PARAMETER_PRODUCT_ID_INVALID}" />
-                       <f:viewAction onPostback="true" action="#{productBeanHelper.notifyControllerProductConverted()}" />
+                       <f:viewAction action="#{productBeanHelper.notifyControllerProductConverted()}" />
                </f:metadata>
        </ui:define>
 
index faa550538fbe90e004743628cbe59c100d910a11..2b66f87fd1df856291833d1d62797c15f50d3649 100644 (file)
@@ -1,16 +1,17 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
-                               xmlns="http://www.w3.org/1999/xhtml"
-                               xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-                               xmlns:h="http://xmlns.jcp.org/jsf/html"
-                               xmlns:f="http://xmlns.jcp.org/jsf/core"
-                               xmlns:p="http://primefaces.org/ui"
-                               >
+<ui:composition
+       template="/WEB-INF/templates/admin/admin_base.tpl"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:p="http://primefaces.org/ui"
+       >
 
        <ui:define name="metadata">
                <f:metadata>
                        <f:viewParam id="productId" name="productId" value="#{productBeanHelper.product}" converter="GenericProductConverter" required="true" requiredMessage="#{project.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}" converterMessage="#{project.PARAMETER_PRODUCT_ID_INVALID}" />
-                       <f:viewAction onPostback="true" action="#{productBeanHelper.notifyControllerProductConverted()}" />
+                       <f:viewAction action="#{productBeanHelper.notifyControllerProductConverted()}" />
                </f:metadata>
        </ui:define>
 
        </ui:define>
 
        <ui:define name="content">
-               <p:message for="productId" showSummary="true" />
-               <!-- @TODO Here goes your content. //-->
+               <p:message for="productId" showSummary="true" rendered="#{empty productBeanHelper.product}" />
+
+               <h:form id="form-edit-product" rendered="#{not empty productBeanHelper.product}">
+                       <h:inputHidden value="#{adminProductController.productId}" />
+
+                       <p:panelGrid
+                               columns="1"
+                               layout="grid"
+                               >
+                               <f:facet name="header">
+                                       <h:outputFormat value="#{project.ADMIN_EDIT_GENERIC_PRODUCT_TITLE}" title="#{local[productBeanHelper.product.productI18nKey]}">
+                                               <f:param value="#{productBeanHelper.product.productId}" />
+                                       </h:outputFormat>
+                               </f:facet>
+
+                               <h:panelGroup styleClass="para" layout="block">
+                                       <h:outputText value="#{project.ADMIN_EDIT_GENERIC_PRODUCT_MINIMUM_DATA}" />
+                               </h:panelGroup>
+
+                               <ui:include src="/WEB-INF/templates/admin/generic_product/admin_form_product_data.tpl" />
+
+                               <f:facet name="footer">
+                                       <p:panelGrid columns="2" layout="grid">
+                                               <p:commandButton
+                                                       type="reset"
+                                                       value="#{msg.BUTTON_RESET_FORM}"
+                                                       />
+
+                                               <p:commandButton
+                                                       process="@form"
+                                                       type="submit"
+                                                       value="#{project.BUTTON_ADMIN_EDIT_GENERIC_PRODUCT}"
+                                                       action="#{adminProductController.updateProduct()}"
+                                                       />
+                                       </p:panelGrid>
+                               </f:facet>
+                       </p:panelGrid>
+               </h:form>
        </ui:define>
 </ui:composition>
index dc38c6d988bbe6c4726144a8ae055f5f620a9175..eb2d7862d3b7ed4d7c7c38ed512b9cd83b44a6ea 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<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"
-                               xmlns:p="http://primefaces.org/ui"
-                               >
+<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"
+       xmlns:p="http://primefaces.org/ui"
+       >
 
        <ui:define name="document_admin_title">
                <h:outputText value="#{project.PAGE_TITLE_ADMIN_LIST_GENERIC_PRODUCT}" />
@@ -22,7 +23,6 @@
                                id="productList"
                                var="product"
                                value="#{productListController.allProducts}"
-                               tableStyleClass="table table-full"
                                paginator="true"
                                paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                filteredValue="#{productListController.filteredProducts}"
                                >
 
                                <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 columns="2" columnClasses="ui-grid-4,ui-grid-8" layout="grid" styleClass="table table-full ui-noborder">
+                                               <p:panelGrid
+                                                       columns="2"
+                                                       columnClasses="ui-grid-4,ui-grid-8"
+                                                       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:panelGrid>
 
                                                <p:outputPanel>
                                                        <p:spacer height="4" />
-                                                       <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
+
+                                                       <p:commandButton
+                                                               id="toggler"
+                                                               type="button"
+                                                               value="#{msg.SELECT_SHOWN_COLUMNS}"
+                                                               styleClass="column-selector"
+                                                               />
+
                                                        <p:columnToggler datasource="productList" trigger="toggler" />
                                                </p:outputPanel>
                                        </p:panelGrid>
@@ -69,7 +85,7 @@
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_I18N_KEY_HEADER}" sortBy="#{product.productI18nKey}" filterBy="#{product.productI18nKey}">
+                               <p:column headerText="#{msg.ADMIN_I18N_KEY_HEADER}" sortBy="#{local[product.productI18nKey]}" filterBy="#{local[product.productI18nKey]}" filterMatchMode="contains">
                                        <h:outputText value="#{local[product.productI18nKey]}" title="#{product.productI18nKey}" />
                                </p:column>
 
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{project.ADMIN_PRODUCT_GROSS_PRICE_HEADER}" sortBy="#{product.productGrossPrice}" filterBy="#{product.productGrossPrice}" filterFunction="#{productListController.filterByPrice}">
+                               <p:column headerText="#{project.GROSS_PRICE_HEADER}" sortBy="#{product.productGrossPrice}" filterBy="#{product.productGrossPrice}" filterFunction="#{productListController.filterByPrice}">
                                        <h:outputText value="#{product.productGrossPrice}">
                                                <!-- @TODO Hard-coded EUR again -->
                                                <f:convertNumber type="currency" currencyCode="EUR" />
                                </p:column>
 
                                <p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{product.productCreated}" filterable="false">
-                                       <h:outputText id="productCreated" value="#{product.productCreated.time}">
-                                               <f:convertDateTime for="productCreated" type="both" timeStyle="short" dateStyle="short" />
+                                       <h:outputText id="productCreated" value="#{product.productCreated}">
+                                               <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                        </h:outputText>
                                </p:column>
 
                                hideEffect="fade"
                                showEffect="fade"
                                widgetVar="productDialog"
-                               position="center,center"
+                               position="top"
                                responsive="true"
                                >
                                <p:outputPanel id="product-details">
-                                       <p:panelGrid columns="2" rendered="#{not empty productListController.selectedProduct}" columnClasses="label,value">
+                                       <p:panelGrid columns="2" rendered="#{not empty productListController.selectedProduct}">
                                                <f:facet name="header">
                                                        <h:outputFormat value="#{project.ADMIN_PRODUCT_DETAILS_HEADER}">
                                                                <f:param value="#{local[productListController.selectedProduct.productI18nKey]}" />
                                                <p:outputLabel value="#{project.CURRENCY_CODE_HEADER}" title="#{project.PRODUCT_CURRENCY_CODE_TITLE}" />
                                                <h:outputText value="#{productListController.selectedProduct.productCurrencyCode}" />
 
-                                               <p:outputLabel value="#{project.PRODUCT_GROSS_PRICE_HEADER}" title="#{project.PRODUCT_GROSS_PRICE_TITLE}" />
+                                               <p:outputLabel value="#{project.GROSS_PRICE_HEADER}" title="#{project.PRODUCT_GROSS_PRICE_TITLE}" />
                                                <h:outputText value="#{productListController.selectedProduct.productGrossPrice}">
                                                        <!-- @TODO Hard-coded EUR again -->
                                                        <f:convertNumber type="currency" currencyCode="EUR" />
                                                </h:outputText>
 
-                                               <p:outputLabel value="#{project.PRODUCT_NET_PRICE_HEADER}" title="#{project.PRODUCT_NET_PRICE_TITLE}" />
+                                               <p:outputLabel value="#{project.NET_PRICE_HEADER}" title="#{project.PRODUCT_NET_PRICE_TITLE}" />
                                                <h:outputText value="#{productListController.selectedProduct.productNetPrice}">
                                                        <!-- @TODO Hard-coded EUR again -->
                                                        <f:convertNumber type="currency" currencyCode="EUR" />
                                                </h:outputText>
 
-                                               <p:outputLabel value="#{project.PRODUCT_TAX_RATE_HEADER}" title="#{project.PRODUCT_TAX_RATE_TITLE}" />
+                                               <p:outputLabel value="#{project.TAX_RATE_HEADER}" title="#{project.PRODUCT_TAX_RATE_TITLE}" />
                                                <h:outputText value="#{productListController.selectedProduct.productTaxRate}">
                                                        <!-- @TODO No real percentage number, 7.0 means 7.0%, not 700% -->
                                                        <f:convertNumber type="number" />
                                                <h:outputText value="#{project.PRODUCT_HAS_NO_MANUFACTURER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productManufacturer}" />
 
                                                <p:outputLabel value="#{msg.ENTRY_CREATED_HEADER}" title="#{project.ADMIN_PRODUCT_ENTRY_CREATED_TITLE}" />
-                                               <h:outputText id="productCreated" value="#{productListController.selectedProduct.productCreated.time}">
-                                                       <f:convertDateTime for="productCreated" type="both" timeStyle="short" dateStyle="short" />
+                                               <h:outputText id="productCreated" value="#{productListController.selectedProduct.productCreated}">
+                                                       <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                                </h:outputText>
                                        </p:panelGrid>
                                </p:outputPanel>
                </h:form>
 
                <h:form id="form-add-product">
-                       <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
+                       <p:panelGrid
+                               columns="1"
+                               layout="grid"
+                               >
                                <f:facet name="header">
                                        <h:outputText value="#{project.ADMIN_ADD_GENERIC_PRODUCT_TITLE}" />
                                </f:facet>
                                <f:facet name="footer">
                                        <p:panelGrid columns="2" layout="grid">
                                                <p:commandButton
-                                                       styleClass="reset"
                                                        type="reset"
                                                        value="#{msg.BUTTON_RESET_FORM}"
                                                        />
 
                                                <p:commandButton
-                                                       styleClass="submit"
+                                                       process="@form"
                                                        type="submit"
                                                        value="#{project.BUTTON_ADMIN_ADD_GENERIC_PRODUCT}"
                                                        action="#{adminProductController.addProduct()}"
index ffa1decae0b604745e2a7ca36c4be9e6d281b757..796bc3765e4f9bb66748a9f49ef7a56948960192 100644 (file)
@@ -1,16 +1,17 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
-                               xmlns="http://www.w3.org/1999/xhtml"
-                               xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-                               xmlns:h="http://xmlns.jcp.org/jsf/html"
-                               xmlns:f="http://xmlns.jcp.org/jsf/core"
-                               xmlns:p="http://primefaces.org/ui"
-                               >
+<ui:composition
+       template="/WEB-INF/templates/admin/admin_base.tpl"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:p="http://primefaces.org/ui"
+       >
 
        <ui:define name="metadata">
                <f:metadata>
                        <f:viewParam id="productId" name="productId" value="#{productBeanHelper.product}" converter="GenericProductConverter" required="true" requiredMessage="#{project.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}" converterMessage="#{project.PARAMETER_PRODUCT_ID_INVALID}" />
-                       <f:viewAction onPostback="true" action="#{productBeanHelper.notifyControllerProductConverted()}" />
+                       <f:viewAction action="#{productBeanHelper.notifyControllerProductConverted()}" />
                </f:metadata>
        </ui:define>
 
index 0b90adf16c418bd19940c8f9a981fce896ca3980..8e52a3addbe0eda736fa13836f6f28c3b4605449 100644 (file)
@@ -1,11 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<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"
-                               xmlns:p="http://primefaces.org/ui">
+<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"
+       xmlns:p="http://primefaces.org/ui"
+       >
 
        <ui:define name="document_admin_title">
                <h:outputText value="#{project.PAGE_TITLE_ADMIN_LIST_PRODUCT_CATEGORY}" />
@@ -21,7 +23,6 @@
                                id="categoryList"
                                var="category"
                                value="#{categoryListController.allCategories}"
-                               tableStyleClass="table table-full"
                                paginator="true"
                                paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                filteredValue="#{categoryListController.filteredCategories}"
                                        <p:panelGrid columns="3" layout="grid" columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2">
                                                <p:spacer />
 
-                                               <p:panelGrid columns="2" columnClasses="ui-grid-4,ui-grid-8" layout="grid" styleClass="table table-full ui-noborder">
+                                               <p:panelGrid
+                                                       columns="2"
+                                                       columnClasses="ui-grid-4,ui-grid-8"
+                                                       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:panelGrid>
 
                                                <p:outputPanel>
                                                        <p:spacer height="4" />
-                                                       <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
+
+                                                       <p:commandButton
+                                                               id="toggler"
+                                                               type="button"
+                                                               value="#{msg.SELECT_SHOWN_COLUMNS}"
+                                                               styleClass="column-selector"
+                                                               />
+
                                                        <p:columnToggler datasource="categoryList" trigger="toggler" />
                                                </p:outputPanel>
                                        </p:panelGrid>
@@ -68,7 +81,7 @@
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_I18N_KEY_HEADER}" sortBy="#{category.categoryI18nKey}" filterBy="#{category.categoryI18nKey}" filterMatchMode="contains">
+                               <p:column headerText="#{msg.ADMIN_I18N_KEY_HEADER}" sortBy="#{local[category.categoryI18nKey]}" filterBy="#{local[category.categoryI18nKey]}" filterMatchMode="contains">
                                        <h:outputText value="#{local[category.categoryI18nKey]}" title="#{category.categoryI18nKey}" />
                                </p:column>
 
                                </p:column>
 
                                <p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{category.categoryCreated}" filterable="false">
-                                       <h:outputText id="categoryCreated" value="#{category.categoryCreated.time}">
-                                               <f:convertDateTime for="categoryCreated" type="both" timeStyle="short" dateStyle="short" />
+                                       <h:outputText id="categoryCreated" value="#{category.categoryCreated}">
+                                               <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                        </h:outputText>
                                </p:column>
 
                                hideEffect="fade"
                                showEffect="fade"
                                widgetVar="categoryDialog"
-                               position="center,center"
+                               position="top"
                                responsive="true"
                                >
                                <p:outputPanel id="category-details">
-                                       <p:panelGrid columns="2" rendered="#{not empty categoryListController.selectedCategory}" columnClasses="label,value">
+                                       <p:panelGrid columns="2" rendered="#{not empty categoryListController.selectedCategory}">
                                                <f:facet name="header">
                                                        <h:outputFormat value="#{project.ADMIN_CATEGORY_DETAILS_HEADER}">
                                                                <f:param value="#{local[categoryListController.selectedCategory.categoryI18nKey]}" />
                                                <h:outputText value="#{project.CATEGORY_HAS_NO_PARENT}" rendered="#{empty categoryListController.selectedCategory.parentCategory}" />
 
                                                <p:outputLabel value="#{msg.ENTRY_CREATED_HEADER}" title="#{project.ADMIN_CATEGORY_ENTRY_CREATED_TITLE}" />
-                                               <h:outputText value="#{categoryListController.selectedCategory.categoryCreated.time}">
+                                               <h:outputText value="#{categoryListController.selectedCategory.categoryCreated}">
                                                        <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
                                                </h:outputText>
                                        </p:panelGrid>
                </h:form>
 
                <h:form id="form-add-category">
-                       <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
+                       <p:panelGrid
+                               columns="1"
+                               layout="grid"
+                               >
                                <f:facet name="header">
                                        <h:outputText value="#{project.ADMIN_ADD_PRODUCT_CATEGORY_TITLE}" />
                                </f:facet>
                                <f:facet name="footer">
                                        <p:panelGrid columns="2" layout="grid">
                                                <p:commandButton
-                                                       styleClass="reset"
                                                        type="reset"
                                                        value="#{msg.BUTTON_RESET_FORM}"
                                                        />
 
                                                <p:commandButton
-                                                       styleClass="submit"
+                                                       process="@form"
                                                        type="submit"
                                                        value="#{project.BUTTON_ADMIN_ADD_PRODUCT_CATEGORY}"
                                                        action="#{adminCategoryController.addCategory()}"