137 total views, 3 views today
JSF OutputLink Example
The JSF h:OutputLink in useful to navigate a page outside of the Web application. The outcome attribute needs complete Web page name or the URL; For example, ‘Home.xhtml’ and not accept viewID like ‘Home’.
JSF Outputlink renders an anchor tag in the browser like below
JSF => <h:outputLink value=”www.google.com”>Google</h:outputLink>
HTML => <a href=”http://www.google.com” target=”_blank”>Google</a>
JSF h:Outputlink Example
Below is the index.xhtml page contains two h:outputlink tag. First one navigates outside of the application and second one navigate to Home.xhtml page. If I not mentioned the http in the first URL then JSF will append the URL at the end of the application URL .
<h:outputLink value="http://www.google.com" target="_blank" >Google</h:outputLink>
It renders in the browser like below.
Download the Source Code:
The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.
Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
Latest posts by Govind
- How to encode and decode base64Binary datatype in Oracle BPEL - December 11, 2017
- How to Read a File using Oracle BPEL File Adapter Example - December 11, 2017
- How to write a File using Oracle BPEL File Adapter Example - December 10, 2017