/**
* Adds given category data from request to database
*/
- public void addCategory () {
+ public void addProductCategory () {
// Is i18n key already used?
if (this.productCategoryListController.isCategoryI18nKeyAdded(this.getCategoryI18nKey())) {
// Throw exception
}
/**
- * Updates given category data from request to database
+ * Updates given product category data from request to database.
* <p>
* @return Redirection outcome
*/
- public String updateCategory () {
+ public String updateProductCategory () {
// Check if current category is set
if (this.getCurrentCategory() == null) {
// Throw NPE
BUTTON_ADMIN_EDIT_PRODUCT_CATEGORY=Produktkategorie \u00e4ndern
ADMIN_EDIT_PRODUCT_CATEGORY_TITLE=Produktkategorie mit Id {0} editieren:
ADMIN_PRODUCT_CATEGORY_NOT_UPDATED=Sie haben die Produktkategorie nicht ge\u00e4ndert.
+SHOWN_IN_STATISTICS_HEADER=In Statistiken angezeigt:
BUTTON_ADMIN_EDIT_PRODUCT_CATEGORY=Change product category
ADMIN_EDIT_PRODUCT_CATEGORY_TITLE=Edit product category Id {0}:
ADMIN_PRODUCT_CATEGORY_NOT_UPDATED=You have not changed the product category.
+SHOWN_IN_STATISTICS_HEADER=Shown in statistics:
<p:commandButton
type="submit"
value="#{product.BUTTON_ADMIN_EDIT_PRODUCT_CATEGORY}"
- action="#{adminProductCategoryActionController.updateCategory()}"
+ action="#{adminProductCategoryActionController.updateProductCategory()}"
/>
</p:panelGrid>
</f:facet>
</p:link>
</p:column>
+ <p:column
+ headerText="#{product.SHOWN_IN_STATISTICS_HEADER}"
+ sortBy="#{category.categoryShownInStatistics}"
+ filterBy="#{category.categoryShownInStatistics}"
+ filterMatchMode="exact"
+ >
+ <f:facet name="filter">
+ <p:selectOneMenu onchange="PF('categoryList').filter()">
+ <f:converter converterId="javax.faces.Boolean" />
+ <f:selectItem itemLabel="#{msg.CHOICE_ALL}" itemValue="#{null}" />
+ <f:selectItem itemLabel="#{msg.CHOICE_YES}" itemValue="true" />
+ <f:selectItem itemLabel="#{msg.CHOICE_NO}" itemValue="false" />
+ </p:selectOneMenu>
+ </f:facet>
+
+ <h:outputText value="#{category.categoryShownInStatistics ? msg.CHOICE_YES : msg.CHOICE_NO}" />
+ </p:column>
+
<p:column
headerText="#{msg.ENTRY_CREATED_HEADER}"
sortBy="#{category.categoryEntryCreated}"
<p:commandButton
type="submit"
value="#{product.BUTTON_ADMIN_ADD_PRODUCT_CATEGORY}"
- action="#{adminCategoryController.addCategory()}"
+ action="#{adminProductCategoryActionController.addProductCategory()}"
update="form-list-categories:categoryList"
/>
</p:panelGrid>
<h:outputText value="#{msg.USER_CREATED}" />
</f:facet>
- <h:outputFormat id="userEntryCreated" value="#{user.userEntryCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
+ <h:outputFormat value="#{user.userEntryCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
</p:column>
</ui:fragment>
</p:dataTable>