JSF outputFormat tag example
1). JSF outputFormat tag Example Structure:
2). index.jsp
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<html>
<head>
<title>JSF outputFormat example</title>
</head>
<body>
<f:view>
<h:form>
<h3><h:outputText value="h:outputFormat example" ></h:outputText></h3>
<hr>
<h3>Text</h3>
<b><h:outputFormat value="Country 1 : {0}, Country 2 : {1}, Country 3 : {2}" >
<f:param value="INDIA" />
<f:param value="USA" />
<f:param value="ENGLAND" />
</h:outputFormat></b>
</h:form>
</f:view>
</body>
</html>
3). OutPut
No comments:
Post a Comment