RichFaces Interview Questions and Answers
Ques 21. What is a4j:status in RichFaces?
The a4j:status component is an indicator of an Ajax request. It has two states: start and stop. The start state indicates that an Ajax request is in progress. When an Ajax Response is returned, the component switches to the stop state. Give a loading progress on a ajax call:
<rich:modalPanel id="statusModalPanelId" autosized="true" resizeable="false">
<h:graphicImage value="/views/images/loading.gif"/>
<a4j:status id="statusId" onstop="Richfaces.hideModalPanel('statusModalPanelId');">
<f:facet name="start"></f:facet>
</a4j:status>
</rich:modalPanel>
Ques 22. What is rich:messages in RichFaces?
rich:messages is an extension for a standard h:messages component. In addition to what the standard component provides, rich:messages:
<
rich:messages
ajaxRendered
=
"true"
/>
Ques 23. What is rich:dataGrid in RichFaces?
The rich:dataGrid component accepts the same data sources as other iteration components and renders them in a grid format, the same way as the h:PanelGrid component does for in-line data. To define the grid's properties and styles, use the same definitions as for the h:panelGrid component.
<
rich:dataGrid
value
=
"#{bean.allEmployees}"
var
=
"emp"
columns
=
"3"
elements
=
"9"
width
=
"600px"
border
=
"0"
>
<
rich:panel
bodyClass
=
"pbody"
>
<
f:facet
name
=
"header"
>
<
h:outputText
value
=
"#{emp.name} #{emp.code}"
></
h:outputText
>
</
f:facet
>
<
h:panelGrid
columns
=
"2"
>
<
h:outputText
value
=
"Salary:"
styleClass
=
"label"
></
h:outputText
>
Is it helpful?
Add Comment
View Comments
Ques 24. What is rich:tree in RichFaces?
The rich:tree component renders a tree control on the page. The most important tree features include the following:
- Native support for Ajax operations
- Support for ajax, client, and server switch types
- Selection capabilities
- Flexible look and feel
<
rich:tree
id
=
"tree"
nodeType
=
"#{node.type}"
var
=
"node"
value
=
"#{bean.rootNodes}"
toggleType
=
"client"
selectionType
=
"ajax"
selectionChangeListener
=
"#{bean.selectionChanged}"
>
<
rich:treeNode
type
=
"country"
>
#{node.name}
</
rich:treeNode
>
<
rich:treeNode
type
=
"company"
iconExpanded
=
"/images/ctry.gif"
iconCollapsed
=
"/images/tree/disc.gif"
>
#{node.name}
</
rich:treeNode
>
<
rich:treeNode
type
=
"cd"
iconLeaf
=
"/images/tree/cd.gif"
>
#{node.artist} - #{node.name} - #{node.year}
</
rich:treeNode
>
Is it helpful?
Add Comment
View Comments
Ques 25. What is rich:tooltip in RichFaces?
The rich:tooltip component creates a small non-modal pop-up that can be used to display additional information for nearly anything on the page.
Most helpful rated by users:
- What is RichFaces?
- What is rich:dataGrid in RichFaces?
- What are the basic configurations of web.xml for Rich Faces?
- What is limitToList attribute?
- What is rich:messages in RichFaces?