Home | About Us | Contact Us | Terms Of Use
JavaServer Faces technology includes:
1. A set of APIs for representing UI components and managing their state, handling events and input validation, defining page navigation, and supporting internationalization and accessibility.
2. A JavaServer Pages (JSP) custom tag library for expressing a JavaServer Faces interface within a JSP page.
Designed to be flexible, JavaServer Faces technology leverages existing, standard UI and web-tier concepts without limiting developers to a particular mark-up language, protocol, or client device. The UI component classes included with JavaServer Faces technology encapsulate the component functionality, not the client-specific presentation, thus enabling JavaServer Faces UI components to be rendered to various client devices. By combining the UI component functionality with custom renderers, which define rendering attributes for a specific UI component, developers can construct custom tags to a particular client device. As a convenience, JavaServer Faces technology provides a custom renderer and a JSP custom tag library for rendering to an HTML client, allowing developers of Java Platform, Enterprise Edition (Java EE) applications to use JavaServer Faces technology in their applications.
Ease-of-use being the primary goal, the JavaServer Faces architecture clearly defines a separation between application logic and presentation while making it easy to connect the presentation layer to the application code. This design enables each member of a web application development team to focus on his or her piece of the development process, and it also provides a simple programming model to link the pieces together. For example, web page developers with no programming expertise can use JavaServer Faces UI component tags to link to application code from within a web page without writing any scripts.
Developed through the Java Community Process under JSR-127, JavaServer Faces technology establishes the standard for building server-side user interfaces. With the contributions of the expert group, the JavaServer Faces APIs are being designed so that they can be leveraged by tools that will make web application development even easier. Several respected tools vendors were members of the JSR-127 expert group, which developed the JavaServer Faces 1.0 specification. These vendors are committed to supporting the JavaServer Faces technology in their tools, thus promoting the adoption of the JavaServer Faces technology standard.
The expert group is actively developing the specification for JavaServer Faces version 1.2. To check its current status, please see JSR-252.
11. What are the JSF life-cycle phases?
The six phases of the JSF application lifecycle are as follows (note the event processing at each phase):
1. Restore view
2. Apply request values; process events
3. Process validations; process events
4. Update model values; process events
5. Invoke application; process events
6. Render response
12. What are The main tags in JSF?
A:JSF application typically uses JSP pages to represent views. JSF provides useful special tags to enhance these views. Each tag gives rise to an associated component. JSF (Sun Implementation) provides 43 tags in two standard JSF tag libraries:
JSF Core Tags Library.
JSF Html Tags Library.
13. What Is a JavaServer Faces Application?
A: JavaServer Faces applications are just like any other Java web application. They run in a servlet container, and they typically contain the following:
JavaBeans components containing application-specific functionality and data.
Event listeners.
Pages, such as JSP pages.
Server-side helper classes, such as database access beans.
In addition to these items, a JavaServer Faces application also has:
A custom tag library for rendering UI components on a page.
A custom tag library for representing event handlers, validators, and other actions.
UI components represented as stateful objects on the server.
Backing beans, which define properties and functions for UI components.
Validators, converters, event listeners, and event handlers.
An application configuration resource file for configuring application resources.
14. What is Backing Bean?
Backing beans are JavaBeans components associated with UI components used in a page. Backing-bean management separates the definition of UI component objects from objects that perform application-specific processing and hold data.
The backing bean defines properties and handling-logics associated with the UI components used on the page. Each backing-bean property is bound to either a component instance or its value. A backing bean also defines a set of methods that perform functions for the component, such as validating the component's data, handling events that the component fires and performing processing associated with navigation when the component activates.
15. What is JSF (or JavaServer Faces)?
A server side user interface component framework for Java? technology-based web applications.JavaServer Faces (JSF) is an industry standard and a framework for building component-based user interfaces for web applications.
JSF contains an API for representing UI components and managing their state; handling events, server-side validation, and data conversion; defining page navigation; supporting internationalization and accessibility; and providing extensibility for all these features.
16. What is Managed Bean?
JavaBean objects managed by a JSF implementation are called managed beans. A managed bean describes how a bean is created and managed. It has nothing to do with the bean's functionalities.
17. What is the difference between JSP-EL and JSF-EL?
JSP-EL JSF-EL
In JSP-EL the value expressions are delimited by ${?}. In JSf-EL the value expressions are delimited by #{?}.
The ${?} delimiter denotes the immediate evaluation of the expressions, at the time that the application server processes the page. The #{?} delimiter denotes deferred evaluation. With deferred evaluation ,the application server retains the expression and evaluates it whenever a value is needed.
18. What is the difference between the domain object model and a view object?
In a simple Web application, a domain object model can be used across all tiers, however, in a more complex Web application, a separate view object model needs to be used. Domain object model is about the business object and should belong in the business-logic tier. It contains the business data and business logic associated with the specific business object. A view object contains presentation-specific data and behavior. It contains data and logic specific to the presentation tier.
19. What makes a Backing Bean is the relationship it has with a JSF page; it acts as a place to put component references and Event code.
Backing Beans Managed Beans
A backing bean is any bean that is referenced by a form. A managed bean is a backing bean that has been registered with JSF (in faces-config.xml) and it automatically created (and optionally initialized) by JSF when it is needed.
The advantage of managed beans is that the JSF framework will automatically create these beans, optionally initialize them with parameters you specify in faces-config.xml,
Backing Beans should be defined only in the request scope The managed beans that are created by JSF can be stored within the request, session, or application scopes
Backing Beans should be defined in the request scope, exist in a one-to-one relationship with a particular page and hold all of the page specific event handling code.In a real-world scenario, several pages may need to share the same backing bean behind the scenes.A backing bean not only contains view data, but also behavior related to that data.
20. What typical JSF application consists of?
A typical JSF application consists of the following parts: JavaBeans components for managing application state and behavior. Event-driven development (via listeners as in traditional GUI development). Pages that represent MVC-style views; pages reference view roots via the JSF component tree.