1: <%--
2: Document : index
3: Created on : Jan 2, 2010, 5:37:03 PM
4: Author : Ondrej Macoszek <macosond@fel.cvut.cz>
5: --%>
6: <%@page contentType="text/html" pageEncoding="UTF-8"%>
7:
8: <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
9: <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
10: <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
11:
12: <f:view locale="#{localeBack.currentLocale}">
13: <jsp:include page="header.jsp" />
14:
15: <h:form>
16: <h:commandLink value="#{title.genreAdd}" action="add" />
17:
18: <h2><h:outputText value="#{title.genreList}" /></h2>
19:
20: <c:choose>
21: <c:when test="${genreBack.genreListModel.rowCount > 0}" >
22: <h:dataTable value="#{genreBack.genreListModel}" var="genre">
23: <h:column>
24: <f:facet name="header">
25: <h:outputText value="#{msg.name}" />
26: </f:facet>
27: <h:outputText value="#{genre.name}" />
28: </h:column>
29:
30: <h:column>
31: <h:commandButton action="#{genreBack.edit}" value="#{msg.edit}" />
32: <h:commandButton action="#{genreBack.delete}" value="#{msg.delete}" />
33: </h:column>
34: </h:dataTable>
35: </c:when>
36: <c:otherwise>
37: <p><h:outputText value="#{msg.noResults}" /></p>
38: </c:otherwise>
39: </c:choose>
40: </h:form>
41:
42: <jsp:include page="/common/footer.jsp" />
43: </f:view>