Magazine
 
Tomahawk Tags
 

2-Tomahawk selectOneCountry tag

This tag is used to create the component, which displays the list of countries in selection box according to the locale.

Code Description:

<%@ taglib uri=”http://java.sun.com/jsf/
html” prefix=”h”%>
<%@ taglib uri=”http://java.sun.com/jsf/
core” prefix=”f”%>
<%@ taglib uri=”http://myfaces.apache.org/
tomahawk” prefix=”t”%>
<f:view>
<html>
<head>
<meta http-equiv=”Content-Type”
content=”text/html;charset=iso-8859-1">
<title>t:selectOneCountry example</title>
<style type=”text/css”>
<!—
body{
background-color:#fff2f2;
margin-top:30;
}
—>
</style>
</head>
<body >
<h:form><center>
<t:panelGrid columns=”2" style=”fontweight:
bold;”>
<t:outputLabel for=”name” value=”Name” />
<t:inputText id=”name”/>
<t:outputLabel for=”phone” value=”Phone
No.” />
<t:inputText id=”phone”/>
<t:outputLabel for=”country”value=”Country”
/>
<t:selectOneCountry id=”country”
maxLength=”16"
emptySelection=”Select Country”/>
</t:panelGrid>
</center>
</h:form>
</body>
</html>
</f:view>

 

Rendered Output:

3-Tomahawk selectOneLanguage tag

This tag is used to create the component, which displays the list of languages in selection box according to the locale.

Code Description :

<%@ taglib uri=”http://java.sun.com/jsf/
html” prefix=”h”%>
<%@ taglib uri=”http://java.sun.com/jsf/
core” prefix=”f”%>
<%@ taglib uri=”http://myfaces.apache.org/
tomahawk” prefix=”t”%>
<f:view>
<html>
<head>
<meta http-equiv=”Content-Type”
content=”text/html; charset=iso-8859-1">
<title>t:selectOneLanguage example</title>
<style type=”text/css”>
<!—
body{
background-color:#fff2f2;
margin-top:30;
}
—>
</style>
</head>
<body >
<h:form><center>
<t:panelGrid columns=”2" style=”fontweight:
bold;”>
<t:outputLabel for=”name” value=”Name” />
<t:inputText id=”name”/>
<t:outputLabel for=”phone” value=”Phone

Oct 2007 | Java Jazz Up |36
 
previous
index
next
 
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 , 54, 55, 56, 57,

58
, 59, 60, 61, 62, 63 , 64, 65 , 66 , 67 , 68 , 69 , 70, 71, 72, 73, 74, 75, 76, 77, 78,   Download PDF