1
<%@page contentType="text/html"%>
2
<%@page pageEncoding="UTF-8"%>
3
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
4
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
7
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8
<title>List DiscountCode</title>
12
<h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
13
<h1>Listing DiscountCodes</h1>
15
<h:commandLink action="#{discountCode.createSetup}" value="New DiscountCode"/>
17
<a href="/JsfJpaCrud/index.jsp">Back to index</a>
19
<h:outputText value="Item #{discountCode.firstItem + 1}..#{discountCode.lastItem} of #{discountCode.itemCount}"/>
20
<h:commandLink action="#{discountCode.prev}" value="Previous #{discountCode.batchSize}" rendered="#{discountCode.firstItem >= discountCode.batchSize}"/>
21
<h:commandLink action="#{discountCode.next}" value="Next #{discountCode.batchSize}" rendered="#{discountCode.lastItem + discountCode.batchSize <= discountCode.itemCount}"/>
22
<h:commandLink action="#{discountCode.next}" value="Remaining #{discountCode.itemCount - discountCode.lastItem}"
23
rendered="#{discountCode.lastItem < discountCode.itemCount && discountCode.lastItem + discountCode.batchSize > discountCode.itemCount}"/>
24
<h:dataTable value='#{discountCode.discountCodes}' var='item' border="1" cellpadding="2" cellspacing="0">
26
<f:facet name="header">
27
<h:outputText value="DiscountCode"/>
29
<h:commandLink action="#{discountCode.detailSetup}" value="#{item.discountCode}"/>
32
<f:facet name="header">
33
<h:outputText value="Rate"/>
35
<h:outputText value="#{item.rate}"/>
38
<h:commandLink value="Destroy" action="#{discountCode.destroy}">
39
<f:param name="discountCodeId" value="#{item.discountCode}"/>
41
<h:outputText value=" "/>
42
<h:commandLink value="Edit" action="#{discountCode.editSetup}">
43
<f:param name="discountCodeId" value="#{item.discountCode}"/>