pdf.css
Google


   


You are here: CodeIdol > Java > Pro JSF and Ajax > page: 32 33 34 35 36 37 38 39 40 41 42


. The <managed-bean-scope> indicates where an instance of
this bean will be stored after it has been created--request, session, or application scope. The
code sample also has an option to set the scope to none for a bean that should not be stored in
any scope but instead be instantiated on every access. Table 1-2 lists all the available scopes.

Table 1-2.
Managed Bean Scopes
Managed Bean Scope
Description
None
Instance created for every method invocation
Request
Instance created for every request
Session
Instance created on initial request and stored in the session
Application
Instance created on initial request and stored in the Web application
View
The JSF view layer describes the intended layout, behavior, and rendering of the application.
One of the cornerstones of a JSF application is the UIComponent. UIComponents are the founda-
tion of the JSF view layer and represent the behavior and structure of the application. A
developer would use these UIComponents to construct an application by nesting components
within each other. This nested structure will at runtime be represented as a component hierar-
chy, as shown in Figure 1-4, which in turn represents the view or UI, much like developing a
Swing-based application.

Figure 1-4.
From page description to a JSF component hierarchy
The default page description defined by the JSF specification is JSP, but there is nothing in
the JSF specification preventing an implementer from providing an alternative page descrip-
tion, such as an Extensible Markup Language (XML)­based, WML-based, or plain HTML-based
page description. Using JSP as the page description has its good and bad sides. On the plus
side, it is a well-known and widespread solution; as such, learning how to build applications
with JSF and JSP presents a fairly shallow learning curve for most J2EE developers. In addition,

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
12
You are here: CodeIdol > Java > Pro JSF and Ajax > page: 32 33 34 35 36 37 38 39 40 41 42


ADBRITE ads links
   
Related tags







Popular Categories
Unix books and guides

AJAX popular information
C# language guides
Windows books and cookbooks

.......








Business Key Top Sites

be number one
rate your site




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

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

© CodeIdol Labs, 2007 - 2009