pdf.css
Google


   


You are here: CodeIdol > Java > Pro JSF and Ajax > page: 29 30 31 32 33 34 35 36 37 38 39


<navigation-rule>
<from-view-id>/login.jspx</from-view-id>
<navigation-case>

<from-outcome>success</from-outcome>
<to-view-id>/result.jspx</to-view-id>

</navigation-case>
</navigation-rule>
In Code Sample 1-1, a navigation rule is set so that from a view, login.jspx, on an out-
come of success, the user will be sent to a page called result.jspx. The outcome is the return
value from an action performed in the application such as a button being clicked. In JSF, an
action is attached to the UIComponent, which allows for fine-grained control on the page. These
actions can either have their own navigation rule or share the same navigation rule.

Application Lifecycle
Another benefit that application developers will discover when using JSF is that the frame-
work helps manage UI state across server requests. Instead of having to take care of user
selections and passing these selections from page to page, the framework will handle this for
you. The JSF framework also has built-in processes in the lifecycle to assist with validation,
conversion, and model updates. As a side bonus, JSF provides a simple model for delivering
client-generated events to server-side application code.

Application Development with JSF
One of the key differentiators with JSF is that its architecture is designed to be independent of
specific protocols and markup, and as such it allows developers to attach any rendering tech-
nology to the JSF application. In JSF it is the RenderKit that is responsible for the presentation
of the JSF application by rendering the markup to the client. You can define a RenderKit for
any type of markup (HTML, DHTML, Telnet/character mode, and eventually SVG, Flash, XUL,
and so on) and use it to display a JSF page.

This separation between the page description (UI component hierarchy) and the render-
ing of markup is a key differentiator that provides flexibility to the component developer while
protecting the application developer from changes isolated at the rendering layer. Instead of
having to learn and implement different rendering technologies to solve a common problem,
such as portability between different browsers (such as Netscape vs. Internet Explorer), appli-
cation developers can use custom JSF components to build applications targeted for different
browsers, personal digital assistants (PDAs), and so on, with a common programming
model--JSF and Java.

Applying this new knowledge about JSF to the previous sample in Figure 1-1, the retail
solution, the architecture could look similar to Figure 1-2.
C H A P T E R 1
s
T H E F O U N D AT I O N O F J S F : C O M P O N E N T S
9
You are here: CodeIdol > Java > Pro JSF and Ajax > page: 29 30 31 32 33 34 35 36 37 38 39


   
Related tags







Popular Categories
Unix books and guides

AJAX popular information
C# language guides
Windows books and cookbooks
.......








    С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.

    Русский Polski Francais Deutsch
    support sitemap terms

© CodeIdol Labs, 2007 - 2009