From the course: Java EE: JavaServer Faces JSF
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Selection components
- [Instructor] The selectOneMenu, the selectOneListBox and the selectOneRadio components generate a drop-down menu, a list box and a radio button group, respectively. I consider them sister components because they all allow only one value selection out of many. I've prepped an Application Scope manage bean to supply a list of dessert objects. You can see here is our lists of objects, here's where we're building individual deserts and we have findDessertById function on line 48, that return the specific dessert given a specific ID. I'm using the application scope for this bean because we need to load this data just once for any number of users in the web application. The application scope sees to that. We now only need to inject this bean anywhere we need it. Note how we're initializing the lists of desserts in a post constructor just like we talked about earlier. I've also created a backing bean for input components page and added some fields for us to bind our various input…
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
-
-
-
-
-
-
(Locked)
Introduction to Facelets5m 47s
-
(Locked)
ViewAction and common properties5m 14s
-
(Locked)
Common input text components5m 51s
-
(Locked)
Selection components11m 8s
-
(Locked)
JSF file upload component5m 33s
-
(Locked)
Page layout components4m 54s
-
(Locked)
Display from data structures in Facelets2m 56s
-
(Locked)
Tables in JSF4m 18s
-
(Locked)
Links and buttons2m 59s
-
(Locked)
Display messages4m 48s
-
(Locked)
HTML5 markup and support in JSF7m 45s
-
(Locked)
Bind components to the backing bean3m 13s
-
(Locked)
Expression language in JSF5m 24s
-
(Locked)
Functional programming with EL2m 44s
-
(Locked)
-
-
-
-
-
-