Magazine
 
Tomahawk Tags
 

<title>t:saveState example</title>
</t:documentHead>
<t:documentBody >
<t:saveState id=”state1"
value=”#{Bean.text1}”/>
<t:saveState id=”state2"
value=”#{Bean.text2}”/>
<t:saveState id=”state3"
value=”#{NextBean}”/>
<h:form>
<t:outputText value=”Title1"/>
<t:inputText id=”it1" value=”#{Bean.text1}”/></p>
<t:outputText value=”Title2"/>
<t:inputText id=”it2" value=”#{Bean.text2}”/>
</h:form>
</t:documentBody>
</t:document>
</f:view>

5. Tomahawk inputDate tag
This tag is useful in creating the component to input the date. This component can be of various types. We can create this component to input time only or date only or both. Time can also be supplied in12 hour or 24 hour format. The time can also be set according to
the supplied time zone. The popup calendar can also be rendered if needed. We can also use CSS and java script to make it useful according to our requirement.

<%@ 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:inputDate example</title>
<style type=”text/css”>
<!—
.highlight { background-color: #A8D1E8;

 

color:blue;}
—>
</style>
</t:documentHead>
<t:documentBody >
<h:form>
<t:inputDate id=”date1" /></p>
<t:inputDate id=”date2" opupCalendar=”true”/> </p>
<t:inputDate id=”date3" type=”time”/></p>
<t:inputDate id=”date4" type=”date”/></p>
<t:inputDate id=”date5" type=”short_time”/></p>
<t:inputDate id=”date6" type=”both”/></p>
<t:inputDate id=”date7" type=”full”/></p>
<t:inputDate id=”date8"emptyMonthSelection=”Select Month”
type=”date” popupCalendar=”true”onmouseover=”this.className=’highlight’”
onmouseout=”this.className=’normal’”/>
</p>
<t:inputDate id=”date9" type=”time”ampm=”true” emptyAmpmSelection=”AM/PM” />
</h:form>
</t:documentBody>
</t:document>
</f:view>

Rendered Output

 Nov  2007 | Java Jazz Up |25
 
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