Most read:
Popular archives:
Java Q&A Forums - Let the great migration begin
We're pleased to announce the first phase of the integration of the Java Q&A Forums with our community platform, JavaWorld's
Daily Brew. Whether you're one of our longtime forum users or a brand newbie, we hope you'll visit the Java Q&A Forums in their new home alongside JW Blogs.
| Enterprise AJAX - Transcend the Hype |
| Oracle Compatibility Developer's Guide |
The JavaServer Faces component architecture simplifies much of JavaServer Pages design-time builds and runtime configuration data; in the JSF lifecycle, any POJO (plain-old Java object) can be the managed bean, whose attributes and methods map directly to HTTP form values and actions. In addition, the rich set of components provided by JSF simplifies and quickens the creation of Web front ends. The more complex the widgets, the simpler JSF is to use: no low-level HTML and JavaScript coding, and say goodbye to JSP scriplets. Also, JSF provides both form- and field-level validation by default. The pluggable conversion framework seamlessly converts HTML string presentation from/to any POJO type. And finally, you can easily integrate an existing JSF application into a portal environment with much less effort when compared to integrating a Struts application.
As with any framework, JSF is not a silver bullet for solving all your Web application development problems, but it does provide a good foundation where the Java community, and visual component and GUI tool vendors can come together to standardize Java Web application development. I recommend considering JSF for your next Web development project.
Once you decide to use JSF as your Web framework, the next question you might have is which JSF implementation to choose. Indeed, many JSF component sets and libraries are available, both as open source and commercial offerings. Among them, the MyFaces implementation meets most needs well in terms of building an enterprise-grade real-world application without requiring you to make your own components. MyFaces not only provides a rich set of pre-built components, it also addresses many shortcomings and issues found in JSF 1.1. Recently, Oracle ADF (Application Development Framework) components have joined the MyFaces family. Let's see how MyFaces solves a classic Web application use-case.
The header/detail use-case is common in Web applications: A list of search results are presented in a table view. A user can traverse the results in the table and select a row to work on. Figure 1 shows an employee module, which demonstrates the header/detail use-case.
Figure 1. Employee module. Click on thumbnail to view full-sized image.
In this employee-header example, we use two MyFaces components: <t:dataTable> to create the table view for presenting header information and <t:dataScroller> to provide easy pagination capability. In addition, we also add the cell-level employee information update. When a user clicks
the Edit icon, the employee's details display at the bottom of the screen, as shown in Figure 2.
Figure 2. Employee information displays when user clicks Edit icon. Click on thumbnail to view full-sized image.
The user can also click on the Contact tab to view other employee detail information (see Figure 3).
Figure 3. Employee contact information displays when user clicks on Contact tab. Click on thumbnail to view full-sized image.
In the employee-detail-view page, we use <t:panelTabbedPane> to nicely group related employee information for the best GUI presentation. The MyFaces <t:panelTabbedPane> component provides both the DHTML client-side and server-side tab-toggling. In this use-case, we use the default DHTML client-side
tab-toggling.
| Subject | Replies |
Last post
|
|
By Athen
|
0 |
08/28/08 01:51 PM
by Athen |
|
By uzmosla |
1 |
08/14/08 04:27 AM
by Anonymous |
|
By gpkcygpunw |
0 |
04/25/08 03:36 AM
by Anonymous |
|
By |
0 |
03/12/08 12:06 AM
by Anonymous |