From the course: Java EE 8: JavaServer Faces JSF 2.3

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Java data structures in JSF 2.3

Java data structures in JSF 2.3

From the course: Java EE 8: JavaServer Faces JSF 2.3

Start my 1-month free trial

Java data structures in JSF 2.3

- [Instructor] JSF 2.3 has introduced robust collection support. Okay, so let me break down how convenient that is. Before this, using anything but lists and arrays in facelets was a hassle. Displaying data in a data table, selection component, or elsewhere was less than convenient. But rejoice! This video is the story of how you could easily use sets, maps and even custom data structures really easily in facelets. So I created this request scope bean and it has a couple of fields. So I have, on line 16 of standard Java array of strings named desserts, and well, wouldn't you know? It contains some desserts. On line 17, I have a mapOfDesserts currently empty as at line 17, same for the setOfDesserts on line 18. The two collections here, that's the maps and the sets are being populated in a post constructive method here on line 23 and line 24. Basically, I'm tracing through the desserts array and populating both of them…

Contents