Instructor-led training
JavaServer Faces Training in St. Louis, Missouri
This intensive, hands-on, two-day course teaches Java web developers how to create JavaServer Faces (JSF) 2.0 based web applications.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in St. Louis, Missouri or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
Getting Started with JSF
GUI Development
A JSF Application
JSF Components
Managed Beans
JSF Application Structure
Running the Application
Managed Beans
Managed Beans and MVC
Properties
Managed Bean Annotations
Bean Scope Annotations
Value Expressions
Method Expressions
JSF Tag Libraries
The JSF Component Tree
JSF Tag Libraries
Resources
Forms
Input Tags
Output Tags
Submitting Form Data with HTTP Post
View Parameters
Passing Data with HTTP Get
Checkboxes
Radio Buttons, Listboxes, and Menus
Panels
JSF Lifecycle and Event Handling
JSF Lifecycle Overview
Restore View Phase
Apply Request Values Phase
Process Validation Phase
Update Model Values Phase
Invoke Application Phase
Render Response Phase
JSF Events
Action Events
Value Change Events
Immediate Events
Data Table Component
Data Tables
Basic Structure
Facets
Styles
Adding Editable Components
DataModel
Sorting
Scrolling
Validators and Converters
Validation and Conversion within the JSF Lifecycle
Converting Dates
Converting Numbers
Displaying Conversion Errors
Built-In Validators
Customizing Error Messages
Writing Your Own Converter
Custom Converter Configuration
Writing Your Own Validator
Ajax
Ajax and JSF
Events
Execute and Render
Grouping
Validation
The onevent Attribute
The onerror Attribute
The listener Attribute
Appendix A – Internationalization
I18NandL10N
Resource Bundles
Configuring a Resource Bundle
Using a Resource Bundle
Specifying the Locale
I18N in Custom Code
Dates and Numbers
Appendix B – faces-config.xml Navigation
Navigating Through a JSF Application
Basic Navigation Configuration
From View ID
From Action
Forward vs. Redirect1. Web Applications and MVC
What makes JavaServer Faces hard to master
The Java is rarely the obstacle. JSF is a component framework, not a page-at-a-time template system, so the difficulty is knowing when things happen. The syllabus builds toward that in order.
- Beans and expressions first. Managed beans, properties, bean scope annotations, value expressions and method expressions connect a page to server-side state. Choosing the wrong scope is a common source of data that persists too long or disappears between requests.
- The component tree and tag libraries. Forms, input and output tags, checkboxes, listboxes, panels, and View Parameters for HTTP Get. Developers used to plain HTML often expect a form to behave like a raw request rather than a tree of components with their own state.
- The lifecycle. Restore View, Apply Request Values, Process Validation, Update Model Values, Invoke Application and Render Response. A frequent misconception is that a setter or action runs as soon as the user submits. In fact, a failed conversion or validation stops the request before the model is updated and before the action is invoked. Action events, value change events and immediate events only make sense against these phases.
- Data tables. Facets, styles,
DataModel, sorting, scrolling and editable components inside rows. - Conversion and validation. Built-in validators, date and number converters, custom error messages, and writing your own converter and validator, including configuring the converter.
- Ajax. The execute and render attributes, grouping, and the
onevent,onerrorandlistenerattributes. Ajax requests still pass through the lifecycle, so the earlier material determines what a partial request does.
Appendices cover internationalization with resource bundles and locales, and navigation rules in faces-config.xml, including forward versus redirect.
Who it suits and what to take around it
This is a general-level, two-day course for Java web developers. The stated prerequisites are Java Programming, Java Web Programming and familiarity with HTML. You should be comfortable with servlets, request and session scope, and basic HTML forms. The Java Programming courses and learning guide show where to build those foundations.
JSF handles the presentation layer, so persistence and business logic usually come next. The Building Modern Java Enterprise Apps: JPA, EJB3, & JSF course puts JSF alongside the persistence and EJB layers that typically sit behind managed beans. If your pages will also talk to other systems, Developing RESTful Services Using Java covers the service side.
Organizations on a particular release of the Java stack can ask for private training tailored to those versions. Request a training proposal to discuss it.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Order-entry form. A team might build a form where users enter dates and amounts. Date and number converters, built-in validators and customized error messages would give consistent feedback, and a custom validator could enforce a business rule such as a cross-field check.
- Browsable record list. For example, an internal tool might show hundreds of records in a data table with sorting and scrolling. Editable cells and a
DataModelwould let users update rows, and View Parameters would let a detail page be bookmarked through HTTP Get. - Responsive, multilingual page. A team might validate one field through an Ajax request using execute and render, so the rest of the page is not reprocessed. Resource bundles and locale selection could supply labels in several languages.
AI coding assistants and JSF
AI coding assistants are useful for boilerplate: a managed bean with properties, a form page with input and output tags, or a first draft of a converter or validator class. They can also suggest a table layout or resource bundle entries.
They fail where JSF depends on context. Typical problems:
- Mixed generations of the API. Suggestions may combine annotations, namespaces or package names from different releases, so check them against the versions your project actually uses.
- Wrong scope. A bean scope that compiles but holds state too long or too short.
- Lifecycle errors. Validation or logic placed where it runs at the wrong phase, or an immediate event used without understanding its effect on the rest of the request.
- Ajax attributes. Plausible but wrong execute and render values that update the wrong region of the page.
To verify, submit invalid and boundary input and confirm the model is not updated when conversion or validation fails. Exercise each action and value change event in a browser. Test Ajax interactions with the surrounding form fields both valid and invalid. Review generated code for output that is unescaped or built from raw request data.
Frequently asked questions
What level is this course?
It is a general-level, two-day course for Java web developers who want to build web applications with JavaServer Faces.
What should I know before attending?
Java Programming, Java Web Programming and familiarity with HTML. Experience with servlets and web forms makes the lifecycle material easier to follow.
What does the course cover?
Managed beans, scopes and expressions; JSF tag libraries and forms; the lifecycle and event handling; data tables; validators and converters, including custom ones; and Ajax. Appendices cover internationalization and faces-config.xml navigation.
Can the course be delivered privately for our team?
Yes. HSG delivers private training for organizations either onsite at the client's location or live online.
Can the content be customized?
Private courses can be customized, including tailoring to the technology versions your organization uses. Use the training proposal request to describe your environment and goals.
Training locations
JavaServer Faces training across the U.S. and beyond.
We provide private JavaServer Faces training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all JavaServer Faces training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.