Google News
logo
Java RichFaces Interview Questions
RichFaces is an open source, advanced user interface component framework which is used to easily integrate Ajax capabilities into JavaServer application.
 
It is designed and developed by Jboss. It is implemented as a component library which adds Ajax capability into existing pages. So, a developer doesn't need to write any JavaScript or JQuery code.
 
RichFaces uses several parts of the JSF 2 framework including the lifecycle, validation, conversion facilities and management of resources.
 
RichFaces 4 supports full JSF 2 integration and uses standard web application technologies such as JavaScript, XML (Extensible Markup Language), and XHTML (Extensible Hypertext Markup Language).
* Provides rich user interface components library.
* Allows to create custom components with built in ajax support.
* Generate binary resources on the fly. Like: generating image, sound during run time.
* Skinning Technology
* Component Development Kit (CDK) to assist in constructing JavaServer Faces components.
* Dynamic Resource Framework.
* Component based Ajax control components.
To configure RichFaces, we need to download JARs provided by Jboss. After downloading, we can add that in our project.
RichFaces has an architecture which consists of the following important elements.
 
* Ajax Action Components
* Ajax Containers
* Ajax Output
* Skins and Theming
* RichFaces Ajax Extensions
RichFaces provides tag libraries which are capable to send Ajax request from JavaServer Faces pages.
 
The <a4j:commandButton> and <a4j:commandLink> tags are used to send an Ajax request on the click JavaScript event.
6 .
Why do we use RichFaces <a4j:log> component?
The <a4j:log> component generates JavaScript that opens a debug window, logging application information such as requests, responses, and DOM changes.
This component is used to group components together to update that as a whole rather than specify the components individually.
RichFaces provides calendar component that we can implement in the JSF file.

It is used to enter a date and time through a pop-up calendar. The pop-up calendar can navigate through months and years. We can also customize its look and feel.
 
The <rich:calendar> component requires only one value attribute which holds the current selected date.
RichFaces provides the <rich:editor> component which is used to create a WYSIWYG editor in the HTML page.
 
The <rich:editor> component is based on the CKEditor implementation.
RichFaces provides the <rich:fileUpload> component which is used to upload files to the server. It provides lots of attributes that we can use in our application.
RichFaces provides <rich:inplaceInput> component which is used to create a editable text box. It allows text to be entered in-line in blocks of text.
InplaceSelect component is similar to the <rich:inplaceInput> component, except that it uses a drop-down selection box to enter text instead of a text field.
It provides a slider for changing numerical values. It is used to select numerical value by selecting from the slider's range.
This component is a single-line input field with buttons to increase and decrease a numerical value. It is used to input values by using provided spinner.
We can use it in an auto-completing mode, where the values in the drop-down list are provided dynamically using either the autocompleteMethod or autocompleteList attributes.
RichFaces provides <rich:orderingList> component for ordering items in a list at client-side. We need to use the value attribute to the list to be ordered.
It is used to select items from a list. It allows us to change order of selected items at client-side. We can add, remove items from the source list to the target list and vice-versa.
It is a bordered panel with an optional header. For basic usage, it does not require any attribute. A <rich:panel> without any attributes defined renders a bordered region with no header.
 
We should use header attribute to specify the text to appear in the header.
It is used to render a table which displays data in tabular form. It works with the <rich:column> and <rich:columnGroup> components to list the contents of a data model.
This component acts as a child element to the <rich:dataTable>. It iterates through the child collections in the currently iterated object to create detailed tables.
RichFaces provides <rich:list> to render a list of items. We can create numerically ordered list, an un-ordered, bullet-point list etc. It uses a data model for managing the list items which can be updated dynamically.
The <rich:dataScroller> is used for navigate through multiple pages of tables. It must be places in a facet of the table. We can also use the for attribute to bind parent tables to the scroller.
The <rich:tree> component is used to create a hierarchical tree. It uses <rich:treeNode> as a child component.
 
We can create customize tree according to our requirement.
The <rich:dropDownMenu> component is used to create a drop-down or a hierarchical menu. We can use it with the <rich:toolbar> component to create menus in an application's toolbar.
The <rich:toolbar> component is used to create a horizontal toolbar. Any JavaServer Faces ( JSF) component can be added to the toolbar.
 
The <rich:toolbar> component does not require any attributes to be defined for basic usage.
The <rich:messages> component works similar to the <rich:message> component and automatically rendered after an Ajax request. It is used to display all the validation messages of the current web page collectively.
It is used to define the position of messages at the web page. Messages displayed by <rich:notify> or <rich:notifyMessage> are displayed in top-right corner of the web page by default.
Progress Bar is used to display the status of a process. It can update either through Ajax or on the client side, and the look and feel can be fully customized.
It is used to provide an informational tool-tip. We can attach tool-tip to any control and is displayed when hovering the mouse cursor over the control.
RichFaces has following features :
 
* JSF Integration
* Error handling
* Resource Loading
* Processing Management
* Skinability
* Component Development Kit
* Ajax components