<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<html>
 <f:view>
 <head>
    <title>Library Administration</title>
    <link rel="stylesheet" type="text/css" href='<%= request.getContextPath() + "/css/app.css" %>'>
 </head>
 <body>
    <h1>Library Administration</h1>
    <hr>
 <h:form>
    <h:commandButton value="Return Home" action="home"/>

    <h:dataTable value="#{library.bookList}" headerClass="tableHeader" var="book">
        <h:column>
            <f:facet name="header">
                <h:outputText value="Title"/>
            </f:facet>
            <h:outputText value="#{book.title}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Author"/>
            </f:facet>
            <h:outputText value="#{book.author}"/>
        </h:column>
        <h:column>
            <f:facet name="header">
                <h:outputText value="Checked Out"/>
            </f:facet>
            <h:selectBooleanCheckbox onclick="submit()"
                value="#{book.checkedOut}"/>
        </h:column>
    </h:dataTable>
 </h:form>
</body>
</f:view>
</html>