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 title="#{title.bandAdd}">
16: <h:commandLink value="#{title.bandAdd}" action="add" />
17:
18: <h2><h:outputText value="#{title.bandList}" /></h2>
19:
20: <c:choose>
21: <c:when test="${bandBack.bandListModel.rowCount > 0}" >
22: <h:dataTable value="#{bandBack.bandListModel}" var="band">
23: <h:column>
24: <f:facet name="header">
25: <h:outputText value="#{msg.name}" />
26: </f:facet>
27: <h:outputText value="#{band.name}" />
28: </h:column>
29: <h:column>
30: <f:facet name="header">
31: <h:outputText value="#{msg.website}" />
32: </f:facet>
33: <h:outputText value="#{band.website}" />
34: </h:column>
35:
36: <h:column>
37: <f:facet name="header">
38: <h:outputText value="#{msg.country}" />
39: </f:facet>
40: <h:outputText value="#{band.country}" />
41: </h:column>
42:
43: <h:column>
44: <f:facet name="header">
45: <h:outputText value="#{msg.dateFoundation}" />
46: </f:facet>
47: <h:outputText value="#{band.dateFoundation}">
48: <f:convertDateTime pattern="dd.MM.yyyy HH:mm" />
49: </h:outputText>
50: </h:column>
51:
52: <h:column>
53: <f:facet name="header">
54: <h:outputText value="#{msg.preferredGenre}" />
55: </f:facet>
56: <h:outputText value="#{band.preferredGenre.name}" />
57: </h:column>
58:
59:
60: <h:column>
61: <f:facet name="header">
62: <h:outputText value="#{msg.musicians}" />
63: </f:facet>
64:
65: <h:dataTable value="#{band.musicians}" var="mus">
66: <h:outputText value="#{mus}" converter="musicianConverter" />
67: </h:dataTable>
68: </h:column>
69:
70: <h:column>
71: <h:commandButton action="#{bandBack.edit}" value="#{msg.edit}" />
72: <h:commandButton action="#{bandBack.delete}" value="#{msg.delete}" />
73: </h:column>
74: </h:dataTable>
75: </c:when>
76: <c:otherwise>
77: <p><h:outputText value="#{msg.noResults}" /></p>
78: </c:otherwise>
79: </c:choose>
80:
81: </h:form>
82:
83: <jsp:include page="/common/footer.jsp" />
84: </f:view>