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.
Display messages
- [Instructor] Let's look at how to use the h:message components to display feedback on the webpage. We've seen that kind of feedback before. Like when we load the index page without supplying the required guest parameter in the URL. This is an implicitly generated h:message component. Based on a configuration new with JSF 2.2. Prior to this version, whenever an error occurs on the server's side without deliberately placing a message component on the Facelets page, neither end user nor page developer would know that anything went wrong. It was a real pain. This is not to say that the message component is useful only when bad things happen. With plan and styling and design, the message component is a great feedback tool. Let's add a message component to this page as part of the greeting. We start by re-organizing here a little bit. Let's add panelGrid so we can keep things in order, columns should be two, let's close this out, and close that down here. Now let's add our h:message…
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.
Contents
-
-
-
-
-
-
(Locked)
Introduction to Facelets5m 47s
-
(Locked)
ViewAction and common properties5m 14s
-
(Locked)
Common input text components5m 51s
-
(Locked)
Selection components11m 8s
-
(Locked)
JSF file upload component5m 33s
-
(Locked)
Page layout components4m 54s
-
(Locked)
Display from data structures in Facelets2m 56s
-
(Locked)
Tables in JSF4m 18s
-
(Locked)
Links and buttons2m 59s
-
(Locked)
Display messages4m 48s
-
(Locked)
HTML5 markup and support in JSF7m 45s
-
(Locked)
Bind components to the backing bean3m 13s
-
(Locked)
Expression language in JSF5m 24s
-
(Locked)
Functional programming with EL2m 44s
-
(Locked)
-
-
-
-
-
-