
<%@ 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>Add Book to Library</title>
    <link rel="stylesheet" type="text/css"
          href='<%= request.getContextPath() + "/css/app.css" %>'>
 </head>
 <body>
    <h1>Add Books to Library</h1>
    <hr>
   Enter information below to add a book to the library.
 <h:form>
    <table>
    <tr>
    <td>Title:</td>
    <td><h:inputText id="title" binding="#{addbookform.title}"
           required="true">

            <f:validateLength minimum="5"/>
        </h:inputText>
        <h:message styleClass="validationWarning" for="title"/>
    </td>
    </tr>
    <tr>
    <td>Author:</td>
    <td><h:inputText id="author" binding="#{addbookform.author}"
           required="true"/>
        <h:message styleClass="validationWarning" for="author"/>
    </td>
    </tr>
    <tr>
    <td>ISBN:</td>
    <td><h:inputText id="isbn" binding="#{addbookform.isbn}"
           required="true">
            <f:validator
               validatorId="ISBNValidator"/>
        </h:inputText>
        <h:message styleClass="validationWarning" for="isbn"/>
    </td>
    </tr>
    </table>

    <p>
    <h:commandButton value="Add Book" action="#{addbookform.addBook}"/>
    <h:commandButton value="Verify" action="verify"/>
    </p>

</h:form>

</body>

</f:view>
</html>