summaryrefslogtreecommitdiffstats
path: root/WebContent/pages/products.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'WebContent/pages/products.xhtml')
-rw-r--r--WebContent/pages/products.xhtml16
1 files changed, 15 insertions, 1 deletions
diff --git a/WebContent/pages/products.xhtml b/WebContent/pages/products.xhtml
index 1b5e5e4..8050c30 100644
--- a/WebContent/pages/products.xhtml
+++ b/WebContent/pages/products.xhtml
@@ -50,8 +50,22 @@
<f:param name="selectedId" value="#{product.id}" />
</h:commandLink>
</h:column>
+ <h:column rendered="#{UserManager.loggedIn}">
+ <f:facet name="header">
+ <h:outputText value="" />
+ </f:facet>
+ <h:commandLink rendered="#{UserManager.loggedIn}" disabled="#{not UserManager.loggedIn}"
+ value="remove" immediate="true" actionListener="#{ProductManager.deleteProduct}" action="deleteProduct">
+ <f:param name="selectedId" value="#{product.id}" />
+ </h:commandLink>
+ </h:column>
</h:dataTable>
-
+ <h:commandLink rendered="#{UserManager.loggedIn}" value="New Product" immediate="true"
+ actionListener="#{ProductManager.newProduct}" action="newProduct">
+ </h:commandLink>
+ <h:commandLink rendered="#{UserManager.loggedIn}" disabled="#{!UserManager.loggedIn}" value="Delete Category" immediate="true"
+ actionListener="#{CategoryManager.deleteCurrentCategory}" action="deleteCurrentCategory">
+ </h:commandLink>
</h:form>
</ui:define>