Learn Java for Web Development

(Tina Meador) #1

294 CHAPTER 6: Component-Based Web Development Using JSF 2


Listing 6-22. sideBar.xhtml



  1. <?xml version="1.0" encoding="UTF-8"?>

  2. <!DOCTYPE html >

  3. <html xmlns="http://www.w3.org/1999/xhtml"

  4. xmlns:h="http://java.sun.com/jsf/html"

  5. xmlns:ui="http://java.sun.com/jsf/facelets">
















  • All Books










  • Categories










  • Contact Us



















  •    Line 6: Shows the usage of the h:form tag instead of using the markup <form>
     Line 15: Shows the usage of the h:commandlink tag that triggers the
    listAllBooks action on the bookController managed bean using the deferred EL

    Developing the User Interface Using UI Components and JSF EL

    Now you will develop the UI of the application. Figure 6-19 illustrates the home page of the
    application. When the user clicks All Books in the sidebar, the list of all books is displayed,
    as illustrated in Figure 6-20.

    Free download pdf