HTML and CSS Reference
In-Depth Information
<f:setPropertyActionListener
target="#{bookRequestsBacking.selectedBookRequest}" value="#{bookRequest}" />
<f:ajax render=":bookRequestForm:results
:bookRequestForm:messages" />
</h:commandLink>
<br/>
<h:commandLink value="Reject request"
action="#{bookRequestsBacking.rejectRequest}">
<f:setPropertyActionListener
target="#{bookRequestsBacking.selectedBookRequest}" value="#{bookRequest}" />
<f:ajax render=":bookRequestForm:results
:bookRequestForm:messages" />
</h:commandLink>
</c:if>
</c:if>
</h:column>
</h:dataTable>
</h:panelGroup>
<h:messages id="messages" class="errorMessage"/>
</h:form>
</ui:define>
</ui:composition>
</html>
A view parameter is created to map the status parameter to the status attribute of bookRequestsBacking CDI
bean via #{bookRequestsBacking.status} , and in the preRenderView event, the requests list under the indicated
status (pending or rejected or approved) is retrieved using #{bookRequestsBacking.retrieveBookRequests}
expression.
When the requests list is retrieved, the <h:dataTable> component is populated with the requests list; every row
in the data table renders a book request with the following information per user role, as shown in Table 13-5 .
Table 13-5. Book Request Attribute Visibility
Book request attribute
View condition
#{bookRequest.bookId.title}
All users (application administrators + application users)
#{bookRequest.responseTime}
All users (application administrators + application users) for only
pending requests
#{bookRequest.requestTime}
All users (application administrators + application users)
#{bookRequest.userId.id}
Appears only for application administrator to show the topic request owner
Search WWH ::




Custom Search