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

Links and buttons

From the course: Java EE: JavaServer Faces JSF

Start my 1-month free trial

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…

Contents