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.

Functional programming with EL

Functional programming with EL

From the course: Java EE: JavaServer Faces JSF

Start my 1-month free trial

Functional programming with EL

- [Instructor] Expression language supports functional programming via lambda expressions and java streams. The functional program's support comes without the need for even java eight. What does it look like? We'll go back to our list of dog breeds. Let's reuse this list of dogs and filter for only dog breeds starting with letter C. So, this is our list of dogs on that. We'll call the stream method and then we want to filter the dog breed and then, only dog breeds that start with the letter C. And then collect that into a list. Let's save this and see what it looks like. And there we have it. Our list of dogs breeds has been filtered down just to the Corgi. Cause it starts with the letter C. Now ideally we should limit the amount of java code that will bleed into the facelets page. But there are some powerful use cases for this functionality. Finally for some configuration. By default, comments in facelets pages like this. This is a comment. Close that out. Comments like this will…

Contents