// Is cache there?
if (!this.productCache.iterator().hasNext()) {
// "Walk" through all entries and add to cache
- for (final Product product : this.productBean.allProducts()) {
+ for (final Product product : this.productBean.fetchAllProducts()) {
// Add it by primary key
this.productCache.put(product.getProductId(), product);
}
// Is cache there?
if (!this.categoryCache.iterator().hasNext()) {
// "Walk" through all entries and add to cache
- for (final Category category : this.categoryBean.allCategories()) {
+ for (final Category category : this.categoryBean.fetchAllCategories()) {
// Add it by primary key
this.categoryCache.put(category.getCategoryId(), category);
}
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>outputProductCategoryAdminDropdownMenu</tag-name>
- <description>This tag renders an administrative drop-down menu for given category instance.</description>
- <source>resources/tags/admin/dropdown/product_category/admin_product_category_links.tpl</source>
- <attribute>
- <name>category</name>
- <description>The product category instance that provides the data for this tag.</description>
- <required>true</required>
- <type>org.mxchange.jproduct.model.category.Category</type>
- </attribute>
- <attribute>
- <name>renderShowLink</name>
- <description>Whether to render (default: true) "show product" link.</description>
- <required>false</required>
- <type>java.langBoolean</type>
- </attribute>
- <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>
- </tag>
- <tag>
- <tag-name>outputGenericProductAdminDropdownMenu</tag-name>
- <description>This tag renders an administrative drop-down menu for given product instance.</description>
- <source>resources/tags/admin/dropdown/generic_product/admin_generic_product_links.tpl</source>
- <attribute>
- <name>genericProduct</name>
- <description>The generic product instance that provides the data for this tag.</description>
- <required>true</required>
- <type>org.mxchange.jproduct.model.product.Product</type>
- </attribute>
- <attribute>
- <name>renderShowLink</name>
- <description>Whether to render (default: true) "show product" link.</description>
- <required>false</required>
- <type>java.langBoolean</type>
- </attribute>
- <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>
- </tag>
</facelet-taglib>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
- xmlns="http://www.w3.org/1999/xhtml"
- 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"
- >
-
- <p:menuButton value="#{msg.OPTIONS}" rendered="#{empty rendered or rendered}">
- <p:menuitem
- outcome="admin_show_generic_product"
- value="#{msg.ADMIN_LINK_SHOW_SHORT}"
- title="#{product.ADMIN_LINK_SHOW_GENERIC_PRODUCT_TITLE}"
- rendered="#{empty renderShowLink or renderShowLink}"
- >
- <f:param name="productId" value="#{genericProduct.productId}" />
- </p:menuitem>
-
- <p:menuitem
- outcome="admin_edit_generic_product"
- value="#{msg.ADMIN_LINK_EDIT_SHORT}"
- title="#{product.ADMIN_LINK_EDIT_GENERIC_PRODUCT_TITLE}"
- >
- <f:param name="productId" value="#{genericProduct.productId}" />
- </p:menuitem>
-
- <p:menuitem outcome="admin_delete_generic_product">
- <h:outputText
- styleClass="link-danger"
- value="#{msg.ADMIN_LINK_DELETE_SHORT}"
- title="#{product.ADMIN_LINK_DELETE_GENERIC_PRODUCT_TITLE}"
- />
- <f:param name="productId" value="#{genericProduct.productId}" />
- </p:menuitem>
- </p:menuButton>
-</ui:composition>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition
- xmlns="http://www.w3.org/1999/xhtml"
- 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"
- >
-
- <p:menuButton value="#{msg.OPTIONS}" rendered="#{empty rendered or rendered}">
- <p:menuitem
- outcome="admin_show_product_category"
- value="#{msg.ADMIN_LINK_SHOW_SHORT}"
- title="#{product.ADMIN_LINK_SHOW_PRODUCT_CATEGORY_TITLE}"
- rendered="#{empty renderShowLink or renderShowLink}"
- >
- <f:param name="categoryId" value="#{category.categoryId}" />
- </p:menuitem>
-
- <p:menuitem
- outcome="admin_edit_product_category"
- value="#{msg.ADMIN_LINK_EDIT_SHORT}"
- title="#{product.ADMIN_LINK_EDIT_PRODUCT_CATEGORY_TITLE}"
- >
- <f:param name="categoryId" value="#{category.categoryId}" />
- </p:menuitem>
-
- <p:menuitem outcome="admin_delete_product_category">
- <h:outputText
- styleClass="link-danger"
- value="#{msg.ADMIN_LINK_DELETE_SHORT}"
- title="#{product.ADMIN_LINK_DELETE_PRODUCT_CATEGORY_TITLE}"
- />
- <f:param name="categoryId" value="#{category.categoryId}" />
- </p:menuitem>
- </p:menuButton>
-</ui:composition>
sortable="false"
filterable="false"
>
- <product-links:outputGenericProductAdminDropdownMenu genericProduct="#{genericProduct}" />
+ <p:menuButton value="#{msg.OPTIONS}">
+ <p:menuitem
+ outcome="admin_show_generic_product"
+ value="#{msg.ADMIN_LINK_SHOW_SHORT}"
+ title="#{product.ADMIN_LINK_SHOW_GENERIC_PRODUCT_TITLE}"
+ >
+ <f:param name="productId" value="#{genericProduct.productId}" />
+ </p:menuitem>
+
+ <p:menuitem
+ outcome="admin_edit_generic_product"
+ value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+ title="#{product.ADMIN_LINK_EDIT_GENERIC_PRODUCT_TITLE}"
+ >
+ <f:param name="productId" value="#{genericProduct.productId}" />
+ </p:menuitem>
+
+ <p:menuitem outcome="admin_delete_generic_product">
+ <h:outputText
+ styleClass="link-danger"
+ value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+ title="#{product.ADMIN_LINK_DELETE_GENERIC_PRODUCT_TITLE}"
+ />
+ <f:param name="productId" value="#{genericProduct.productId}" />
+ </p:menuitem>
+ </p:menuButton>
</p:column>
</p:dataTable>
sortable="false"
filterable="false"
>
- <product-links:outputProductCategoryAdminDropdownMenu category="#{category}" />
+ <p:menuButton value="#{msg.OPTIONS}">
+ <p:menuitem
+ outcome="admin_show_product_category"
+ value="#{msg.ADMIN_LINK_SHOW_SHORT}"
+ title="#{product.ADMIN_LINK_SHOW_PRODUCT_CATEGORY_TITLE}"
+ >
+ <f:param name="categoryId" value="#{category.categoryId}" />
+ </p:menuitem>
+
+ <p:menuitem
+ outcome="admin_edit_product_category"
+ value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+ title="#{product.ADMIN_LINK_EDIT_PRODUCT_CATEGORY_TITLE}"
+ >
+ <f:param name="categoryId" value="#{category.categoryId}" />
+ </p:menuitem>
+
+ <p:menuitem outcome="admin_delete_product_category">
+ <h:outputText
+ styleClass="link-danger"
+ value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+ title="#{product.ADMIN_LINK_DELETE_PRODUCT_CATEGORY_TITLE}"
+ />
+ <f:param name="categoryId" value="#{category.categoryId}" />
+ </p:menuitem>
+ </p:menuButton>
</p:column>
</p:dataTable>