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.
Links and buttons
- [Instructor] We'll now display a hyperlink using the h: link component. Let's put that hyperlink in the data table, inside a column. We'll Copy+Paste the existing column definition there to reuse. Let's name this column the Say Hello Hyperlink. Then, we'll replace the h: outputText with an h: link, whose value attribute will be, Say Hello To. And then, we define the Outcome attribute to become the link that we want to be generated. Let's send this hyperlink to take us to our index.xhtml file, of course, passing in the expected parameter, guest equals the dessert name, let's put that there. Now, let's throw in a button. We'll reuse this column. And then, we have a new column, let's say, Say Hello Button. And all we need to do is replace link with button. Take note that the button here is not like the Command button, in that it cannot call back in Bean code. It's used purely for navigation purposes. Let's save this and see what it looks like on the webpage. And there we have it. We…
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)
-
-
-
-
-
-