pdf.css
Google


   


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


Model
With JSF, the concept of a managed bean has been introduced. The managed bean is the glue
to the application logic--backing code or backing bean. Managed beans are defined in the
faces-config.xml

file and give the application developer full access to all the mapped backing
bean's methods. This concept of IoC is successfully used in frameworks such as Spring, Hive-
Mind, and Oracle ADF model binding (JSR-227). The managed bean facility is responsible for
creating the backing beans or other beans such as Data Access Objects (DAO). In JSF, a back-
ing bean is a plain old Java object (POJO) with no dependency on implementation-specific
interfaces or classes. The aforementioned JSF controller--the FacesServlet--is not aware of
what action has been taken; it is aware only of the outcome of a particular action and will use
that outcome to decide where to navigate. In JSF it is the component that is aware of which
action, or method, to call on a particular user event. Code Sample 1-2 shows a managed bean
defined in the faces-config.xml file.

Code Sample 1-2.
Managed Bean Defined in the faces-config.xml File
<managed-bean>
<managed-bean-name>sample</managed-bean-name>
<managed-bean-class>

com.apress.projsf.ch1.application.SampleBean
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>

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


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