Magazine
 

Tomahawk Tags

 
Tomahawk tags are the collection of standard components with extended functionality and supports all the existing JSF components with additional sets of functionality. Some tomahawk tags are described in the subsequent sections.

1. Tomahawk document tag

This tag is used to embed whole document into the jsp page. It is equivalent to the HTML <html> tag. We can use this tag in place of <html> tag in our JSP page. It has only one attribute “state” that is used to specify the state stored by this component.

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>
<t:document>
<head>
<meta http-equiv=”Content-Type”content=”text/html; charset=iso-8859-1">
<title>t:document example</title>
</head>
<body >
<h:form>
<t:outputText value=”The document tag is equivalent to HTML <html> tag.”/>
</h:form>
</body>
</t:document>
</f:view>

Rendered Output:

  2. Tomahawk documentHead tag

This tag is used to encapsulate the head of the document. It is equivalent to the HTML <head> tag. We can use this tag in place of <head> tag in our JSP page. It has only one attribute “state” that is used to specify the state stored by this component.

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>
<t:document>
<t:documentHead>
<meta http-equiv=”Content-Type”
content=”text/html;charset=iso-8859-1">
<title>t:documentHead example</title>
</t:documentHead>
<body >
<h:form>
<t:outputText value=”The documentHead tag
is equivalent to HTML <head> tag.”/>
</h:form>
</body>
</t:document>
</f:view>

Rendered Output:




 Nov  2007 | Java Jazz Up |23
 
previous
index
next
 
View All Topics
All Pages of this Issue
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   Download PDF