- Mastering JavaServer Faces 2.2
- Anghel Leonard
- 205字
- 2021-12-08 12:41:28
Chapter 2. Communication in JSF
Communication is the core of a JSF application, and is one of the main aspects that dictate the architecture of such an application. Thinking of the big picture, you need to identify—right from the start—the main parts and how they will communicate with one another and with the end user. After selecting design patterns, drawing the UML diagrams, and sketching the architecture and the application flow, it's time to get to work and start implementing the communication pipes using forms, parameters, arguments, values, pages, beans, and so on.
Fortunately, JSF provides many solutions for ensuring a powerful and flexible communication layer between JSF components and also between JSF and XHTML pages, the JavaScript code, and other third-party components. In this chapter, we will cover the following topics:
- Using context parameters
- Passing request parameters with the
<f:param>
tag - Working with view parameters
- Calling actions on GET requests
- Passing attributes with the
<f:attribute>
tag - Setting property values via action listeners
- Passing parameters using the Flash scope
- Replacing the
<f:param>
tag with the JSTL<c:set>
tag - Sending data through cookies
- Working with hidden fields
- Sending passwords
- Accessing UI component attributes programmatically
- Passing parameters via method expressions
- Communicating via the
binding
attribute