| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" |
| 4 | xmlns:ui="http://java.sun.com/jsf/facelets" |
| 5 | xmlns:h="http://java.sun.com/jsf/html" |
| 6 | xmlns:f="http://java.sun.com/jsf/core"> |
| 7 | |
| 8 | <ui:composition template="/template.xhtml"> |
| 9 | <ui:define name="title"> |
| 10 | <h:outputText value="#{bundle.ListAnswerTitle}"></h:outputText> |
| 11 | </ui:define> |
| 12 | <ui:define name="body"> |
| 13 | <h:form styleClass="jsfcrud_list_form"> |
| 14 | <h:panelGroup id="messagePanel" layout="block"> |
| 15 | <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/> |
| 16 | </h:panelGroup> |
| 17 | <h:outputText escape="false" value="#{bundle.ListAnswerEmpty}" rendered="#{answerController.items.rowCount == 0}"/> |
| 18 | <h:panelGroup rendered="#{answerController.items.rowCount > 0}"> |
| 19 | <h:outputText value="#{answerController.pagination.pageFirstItem + 1}..#{answerController.pagination.pageLastItem + 1}/#{answerController.pagination.itemsCount}"/> |
| 20 | <h:commandLink action="#{answerController.previous}" value="#{bundle.Previous} #{answerController.pagination.pageSize}" rendered="#{answerController.pagination.hasPreviousPage}"/> |
| 21 | <h:commandLink action="#{answerController.next}" value="#{bundle.Next} #{answerController.pagination.pageSize}" rendered="#{answerController.pagination.hasNextPage}"/> |
| 22 | <h:dataTable value="#{answerController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px"> |
| 23 | <h:column> |
| 24 | <f:facet name="header"> |
| 25 | <h:outputText value="#{bundle.ListAnswerTitle_id}"/> |
| 26 | </f:facet> |
| 27 | <h:outputText value="#{item.id}"/> |
| 28 | </h:column> |
| 29 | <h:column> |
| 30 | <f:facet name="header"> |
| 31 | <h:outputText value="#{bundle.ListAnswerTitle_text}"/> |
| 32 | </f:facet> |
| 33 | <h:outputText value="#{item.text}"/> |
| 34 | </h:column> |
| 35 | <h:column> |
| 36 | <f:facet name="header"> |
| 37 | <h:outputText value="#{bundle.ListAnswerTitle_likelihood}"/> |
| 38 | </f:facet> |
| 39 | <h:outputText value="#{item.likelihood}"/> |
| 40 | </h:column> |
| 41 | <h:column> |
| 42 | <f:facet name="header"> |
| 43 | <h:outputText value="#{bundle.ListAnswerTitle_question}"/> |
| 44 | </f:facet> |
| 45 | <h:outputText value="#{item.question}"/> |
| 46 | </h:column> |
| 47 | <h:column> |
| 48 | <f:facet name="header"> |
| 49 | <h:outputText value=" "/> |
| 50 | </f:facet> |
| 51 | <h:commandLink action="#{answerController.prepareView}" value="#{bundle.ListAnswerViewLink}"/> |
| 52 | <h:outputText value=" "/> |
| 53 | <h:commandLink action="#{answerController.prepareEdit}" value="#{bundle.ListAnswerEditLink}"/> |
| 54 | <h:outputText value=" "/> |
| 55 | <h:commandLink action="#{answerController.destroy}" value="#{bundle.ListAnswerDestroyLink}"/> |
| 56 | </h:column> |
| 57 | </h:dataTable> |
| 58 | </h:panelGroup> |
| 59 | <br /> |
| 60 | <h:commandLink action="#{answerController.prepareCreate}" value="#{bundle.ListAnswerCreateLink}"/> |
| 61 | <br /> |
| 62 | <br /> |
| 63 | <h:commandLink value="#{bundle.ListAnswerIndexLink}" action="/index" immediate="true" /> |
| 64 | </h:form> |
| 65 | </ui:define> |
| 66 | </ui:composition> |
| 67 | |
| 68 | </html> |