Developing Web Applications using JavaServer Faces
In this chapter we will see how using JSF can simplify web application
development.
The following topics will be covered in this chapter:
-
Creating a JSF project with NetBeans
-
Generating a form to capture user data by draging a JSF form from the NetBeans
palette into our page
-
Laying out JSF tags by taking advantage of the JSF <h:panelGrid> tag
-
Using static and dynamic navigation to defi ne navigation between pages
-
Using the NetBeans New JSF Managed Bean wizard to create a JSF managed bean and
automatically add it to the application's <faces-config.xml> confi
guration fi le
-
Using the NetBeans Page Flow editor to establish page navigation by graphically
connecting pages
-
Implementing custom JSF validators
-
Displaying tabular data in our pages by dragging-and-dropping the JSF Data
Table item from the NetBeans palette into our page
Introduction to JavaServer Faces
Before JSF was developed, Java web applications were typically developed using
non-standard web application frameworks such as Apache Struts, Tapestry, Spring
Web MVC, or many others. These frameworks are built on top of the Servlet and
JSP standards, and automate a lot of functionality that needs to be manually
coded when using these APIs directly.
Having a wide variety of web application frameworks available (at the time of
writing, Wikipedia lists 35 Java web application frameworks, and this list is
far from extensive!), often resulted in "analysis paralysis", that is,
developers often spend an inordinate amount of time evaluating frameworks for
their applications.
The introduction of JSF to the Java EE 5 specifi cation resulted in having a
standard web application framework available in any Java EE 5 compliant
application server.
Strictly speaking, JSF is not a web application framework as such, but a
component framework. In theory, JSF can be used to write applications that are
not web-based, however, in practice JSF is almost always used for this purpose.
In addition to being the standard Java EE 5 component framework, one benefi t of
JSF is that it was designed with graphical tools in mind, making it easy for
tools and IDEs such as NetBeans to take advantage of the JSF component model
with drag-and-drop support for components. NetBeans provides a Visual Web JSF
Designer that allow us to visually create JSF applications.
More Related links
ASP.NET Session
State Management questions with answers
Define Session, SessionId and Session State in ASP.NET. |
What is Session Identifier? | Advantages and disadvantages of using Session
State Management. | What are the Session State Modes? | Define each Session
State mode supported by ASP.NET.
ASP.NET Validation
Control questions with answers
Define Validation Control in ASP.NET. | What are the
validation types supported by ASP.NET? | Describe the steps to use Validation
Control.
Interview
questions and answers on .Net web service
What is XML Web Server? | Describe the Components that help locate and consume
XML Web Service. | Describe the process of communication between Client and Web
Service. | What are the components published while deploying of Web Service? |
Describe .disco file. | Describe the step to be followed to access web service
by client.
|