From the course: Java EE 8 Essential Training

Unlock the full course today

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

Advanced backing beans

Advanced backing beans - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

Advanced backing beans

- [Instructor] In this lesson we're going to take a look at some more advanced usage of data binding within JSF Backing Beans. To help us out I pre-positioned a couple things. First you'll notice the catalog item object. It's just a POJO that contains all the information for a catalog item. So you see several fields here and then we have a constructor that we can use to create an instance of a catalog item. Now over on the form.xhtml file I've basically created a form that has controls which correspond with each of the fields in the catalog item POJO. These elements were created using the HTML tag library within JSF. So what we can do to get started is navigate over to our catalog item form Backing Bean. And what we need to do is switch that Bean over to be session scoped. And this will cause information to persist across different HTTP requests for particular users. Now anytime we use session scope we need to make…

Contents