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.
JSF basics - Java EE Tutorial
From the course: Java EE 8 Essential Training
JSF basics
- So let's continue our work in our JSF project. In order to bind data elements from our facelet, we need to create a backing bean. So, we're going to navigate to the source, main Java directory, and we'll just create a new class. This is going to be a Java POJO. And we're going to name that class the "CatalogItemFormBean", and we'll place that class within the com.linkedin.jsf package. We can then go ahead and hit finish, and here's our new backing bean. Now, it's really simple to create a backing bean. All you need to do is create some fields that you'd like to bind data to; in our case, we're defining some of the fields on our catalog item, such as the name and the manufacturer, and we'll through the SKU in there as well, and then you just create accessors in order to support those fields. Those will be used by the JSF bindings. And there we have it. It's our first backing bean. Now, we also need to…
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.