• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/22

Click to flip

22 Cards in this Set

  • Front
  • Back
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.
What are the advantages of JSF?
* JavaServer Faces architecture makes it easy for the developers to use. In JavaServer Faces technology, user interfaces can be created easily with its built-in UI component library, which handles most of the complexities of user interface management.

* Offers a clean separation between behavior and presentation.

* Provides a rich architecture for managing component state, processing component data, validating user input, and handling events.

* Robust event handling mechanism.

* Events easily tied to server-side code.

* Render kit support for different clients

* Component-level control over statefulness

* Highly 'pluggable' - components, view handler, etc

* JSF also supports internationalization and accessibility

* Offers multiple, standardized vendor implementations
What are the advantages JSF has over Struts ?
* A standard component API for specifying the state and behavior of a wide range of components, including simple components, such as input fields, and more complex components, such as scrollable data tables.

* Developers can also create their own components based on these APIs, and many third parties have already done so and have made their component libraries publicly available.

* A separate rendering model that defines how to render the components in various ways. For example, a component used for selecting an item from a list can be rendered as a menu or a set of radio buttons.

* An event and listener model that defines how to handle events generated by activating a component, such as what to do when a user clicks a button.

* Conversion and validation models for converting and validating component data.
What are the advantages Struts has over JSF ?
* Because Struts is a web application framework, it has a more sophisticated controller architecture than does JavaServer Faces technology. It is more sophisticated partly because the application developer can access the controller by creating an Action object that can integrate with the controller, whereas JavaServer Faces technology does not allow access to the controller. In addition, the Struts controller can do things like access control on each Action based on user roles. This functionality is not provided by JavaServer Faces technology.

* Struts includes a powerful layout management framework, called Tiles, which allows you to create templates that you can reuse across multiple pages, thus enabling you to establish an overall look-and-feel for an application.

* The Struts validation framework includes a larger set of standard validators, which automatically generate both server-side and client-side validation code based on a set of rules in a configuration file. You can also create custom validators and easily include them in your application by adding definitions of them in your configuration file.
What typical JSF application consists of?
* 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.
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.
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.
What are the differences between a Backing Bean and Managed Bean?
Backing Beans are merely a convention, a subtype of JSF Managed Beans which have a very particular purpose. There is nothing special in a Backing Bean that makes it different from any other managed bean apart from its usage.

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.
What is view object?
A view object is a model object used specifically in the presentation tier. It contains the data that must display in the view layer and the logic to validate user input, handle events, and interact with the business-logic tier. The backing bean is the view object in a JSF-based application. Backing bean and view object are interchangeable terms.
What is domain object model?
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.
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.
What do you mean by Bean Scope?
Bean Scope typically holds beans and other objects that need to be available in the different components of a web application.
What are the different kinds of Bean Scopes in JSF?
* Request Scope: The request scope is short-lived. It starts when an HTTP request is submitted and ends when the response is sent back to the client.

* Session Scope: The session scope persists from the time that a session is established until session termination.

* Application Scope: The application scope persists for the entire duration of the web application. This scope is shared among all the requests and sessions.
What are The main tags in JSF?
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.
How do you declare the managed beans in the faces-config.xml file?
<managed-bean>
<managed-bean-name>login</managed-bean-name>
<managed-bean-class>com.developersBookJsf.loginBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
How to declare the Message Bundle in JSF?
<application>
<resource-bundle>
<base-name>com.developersBookJsf.messages</base-name>
<var>message</var>
</resource-bundle>
</application>
What are JSF Navigation Rules ?
Navigation rules tells JSF implementation which page to send back to the browser after a form has been submitted.
How to declare the page navigation (navigation rules) in faces-config.xml file ?
<naviagation-rule>
<from-view-id>/index.jsp</from-view-id>
<navigation-case>
<from-outcome>login</from-outcome>
<to-view-id>/welcome.jsp</to-view-id>
</navigation-case>
</naviagation-rule>
What if no navigation rule matches a given action?
If no navigation rule matches a given action, then the current page is redisplayed.
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):

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
What does it mean by render kit in JSF?
A render kit defines how component classes map to component tags that are appropriate for a particular client. The JavaServer Faces implementation includes a standard HTML render kit for rendering to an HTML client.
Is it possible to have more than one Faces Configuration file?
We can have any number of config files. Just need to register in web.xml.