Aggiunto l'esempio del capitolo su Java Server Faces
This commit is contained in:
30
jsfdemo/src/main/webapp/viewBook.xhtml
Normal file
30
jsfdemo/src/main/webapp/viewBook.xhtml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
|
||||
xmlns:f="http://xmlns.jcp.org/jsf/core">
|
||||
|
||||
<ui:composition template="layout.xhtml">
|
||||
<f:metadata>
|
||||
<f:viewParam name="id" value="#{bookView.book.id}"/>
|
||||
<f:viewAction action="#{bookView.doFindBookById}"/>
|
||||
</f:metadata>
|
||||
<ui:define name="title">View a book</ui:define>
|
||||
<ui:define name="content">
|
||||
<h:panelGrid columns="2">
|
||||
<h:outputLabel value="Title: "/>
|
||||
<h:outputText value="#{bookView.book.title}"/>
|
||||
<h:outputLabel value="Price: "/>
|
||||
<h:outputText value="#{bookView.book.price}"/>
|
||||
<h:outputLabel value="Description: "/>
|
||||
<h:outputText value="#{bookView.book.description}"/>
|
||||
<h:outputLabel value="Number of pages: "/>
|
||||
<h:outputText value="#{bookView.book.nbOfPage}"/>
|
||||
<h:outputLabel value="Illustrations: "/>
|
||||
<h:selectBooleanCheckbox value="#{bookView.book.illustrations}"/>
|
||||
</h:panelGrid>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
Reference in New Issue
Block a user