Downloading MyFaces example integrated with tomahawk
Downloading :
If you are beginner in the field of JSF framework then really its necessary to
follow the examples provided by any source. Here apache itself has provided
examples in a zipped format. These examples are good implementation of Tomahawk
components. Tomahawk examples can be downloaded from http://www.apache.org/dyn/closer.cgi/myfaces/binaries/tomahawk-examples-1.1.6-bin.zip
or http://myfaces.apache.org/download.html.
The downloaded file will be a zip file named tomahawk-examples-1.1.6-bin.zip.
Extract the zip file and you will get 4 war files.
- myfaces-example-blank-1.1.6.war
- myfaces-example-simple-1.1.6.war
- myfaces-example-tiles-1.1.6.war
- myfaces-example-wap-1.1.6.war
Here we will be using myfaces-example-simple-1.1.6.war
to understand features of MyFaces JSF implementation and developing JSF
application using MyFaces Tomahawk components.
For this just place myfaces-example-simple-1.1.6.war file to web-apps
directory of your Tomcat 6.0 server. Restarting server will automatically extracts
this war file to the directory of same name as war file. In this tutorial we
have changed the name of myfaces-example-simple-1.1.6.war file to myfaces.war
so when server restarts there will be a directory of name myfaces.
Place http://localhost:8080/myfaces
URL to the address bar of your browser and hit enter key. You will get a list of
examples like :
- Sample 1
- Sample 2
- File upload
- Tabbed Pane
- Calendar and many
more.
Just click on any link in the list and see the functionalities provided by the examples. In this tutorial some examples are shown below :
- If we click on link Calendar, a
page will open showing a calendar with the current date selected. There are
input boxes to enter date but you can select it from calendar when button
ahead is clicked.
- If we click on File upload link then the page
below appears where browse button, when pressed, opens a window to select
the file to upload.
- When we click on Data Scroller link, the page
appeared below opens which displays specific no. of data at once but
provides links to navigate to the next and previous list of data.
- Clicking on Sortable link presents the page
below. In this we can sort the data according to Car type or Car color by
clicking on Car type and Car color links.
If we click on Car type link, it sorts the data according to car type. You can see the page below.
If we click on Car color link, it sorts the data according to color of the car. You can see the page below.
- We can imbed more than functionalities into one. You
can see it clicking on Paged and Sortable (dynamic number of columns; mouseover)
link. This renders the page below which includes sorting, scrolling and
mousrover event functionality. Taking over the mouse to any row makes the
row bluish.
- Clicking on the link Tree opens the page
below which provides data in a tree like structure. Clicking the (+) sign
appeared before the data explores the tree below and (-) sign takes it to the
previous state i.e. hides the data of this root of the tree.
- Click on JSCookMenu link and you will see the page
below. Taking over the mouse to items explores its sub-items. You can select
any one of them. When the mouse is out of any item then all sub-items
disappears.
You had a glance to the examples developed using MyFaces with Tomahawk. You can go through the code and learn developing JSF application. You can see code for these examples in web-apps\myfaces directory of Tomcat server. In these examples, tomahawk tag library has been used to create many components with added functionality. You can create better UI using these components in your application.