From the course: Java EE: JavaServer Faces JSF
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Bind components to the backing bean
From the course: Java EE: JavaServer Faces JSF
Bind components to the backing bean
- [Instructor] All the Facelets components we've seen so far have an honest to goodness java equivalent. That is, for the input text area component for example, there is a class that you can instantiate that will be as good as the Facelets tag that we've defined on our Facelets page. What does that even look like? And why would you want to do that? Let's revisit our input component page. In the backing bean let's define our password field like so, so we have the html input secret password field being the variable name let's fix the import, and then we encapsulate. Refactor, encapsulate fields, we want both the getter and the setter and there. The HTML input secret class is the java equivalent to the HHTML input secret tag, and so it goes for the vast majority of the available JSF components. You can instantiate a java equivalent of most JSF components. To complete the wiring, we need to define a binding on the Facelets page. So we go to our input secret tag on line 13 and the binding…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Introduction to Facelets5m 47s
-
ViewAction and common properties5m 14s
-
Common input text components5m 51s
-
Selection components11m 8s
-
JSF file upload component5m 33s
-
Page layout components4m 54s
-
Display from data structures in Facelets2m 56s
-
Tables in JSF4m 18s
-
Links and buttons2m 59s
-
Display messages4m 48s
-
HTML5 markup and support in JSF7m 45s
-
Bind components to the backing bean3m 13s
-
Expression language in JSF5m 24s
-
Functional programming with EL2m 44s
-
-
-
-
-
-
-