HTML and CSS Reference
In-Depth Information
<h:column>
<f:facet name="header">
Actions
</f:facet>
<c:if test="#{request.isUserInRole('megaAppUser')}">
<h:commandLink value="Request Copy"
action="#{bookSearchBacking.requestBookCopy}">
<f:setPropertyActionListener
target="#{bookSearchBacking.selectedBook}" value="#{currentBook}" />
<f:ajax render=":searchForm:results :searchForm:messages" />
</h:commandLink>
</c:if>
<c:if test="#{request.isUserInRole('megaAppAdmin')}">
<h:commandLink value="Delete" action="#{bookSearchBacking.deleteBook}">
<f:setPropertyActionListener
target="#{bookSearchBacking.selectedBook}" value="#{currentBook}" />
<f:ajax render=":searchForm:results :searchForm:messages" />
</h:commandLink> <br/>
<h:commandLink value="Download book"
action="#{bookSearchBacking.downloadBook}">
<f:setPropertyActionListener
target="#{bookSearchBacking.selectedBook}" value="#{currentBook}" />
</h:commandLink>
</c:if>
</h:column>
</h:dataTable>
</h:panelGroup>
<h:messages id="messages" class="errorMessage"/>
</h:form>
</ui:define>
</ui:composition>
</html>
When the user enters a book title in the "searchTitle" input text and then clicks the "Search for
books" command button, and using the <f:ajax> tag, the "searchTitle" input value is sent to the server, the
#{bookSearchBacking.retrieveBookList} action method is executed, and finally the "results" panel is rendered
with the retrieved books list and the number of displayed books. The <h:dataTable> component inside the "results"
panel is populated with the topic list; every row in the data table renders a book with the following information:
ISBN
Publisher
Title
 
Search WWH ::




Custom Search