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

Selection components

From the course: Java EE: JavaServer Faces JSF

Start my 1-month free trial

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…

Contents