RichFaces Interview Questions and Answers
Intermediate / 1 to 5 years experienced level questions & answers
Ques 1. How to pass parameters to a4j:commandButton?
See the example to pass parameters to a4j command button:
Ques 2. How to send and ajax request?
Ques 3. How to upload files in richfaces?
Using rich:fileUplaod.
Ques 4. What is a4j:param in RichFaces?
<
a4j:commandButton
value
=
"Update Name"
render
=
"rep"
>
<
a4j:param
value
=
"WithoutBook"
assignTo
=
"#{bean.name}"
/>
</
a4j:commandButton
>
Ques 5. 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 6. 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 7. 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 8. What is rich:calendar in RichFaces?
The rich:calendar component allows you to select a date using a monthly calendar widget. It is possible to use the component in a popup or inline mode. In popup mode the calendar is initially rendered as an input for date with a button on the right side to trigger the popup. For inline mode, the monthly calendar is rendered on the page initially.
<
rich:calendar
value
=
"#{calendarBean.dateSelected}"
id
=
"calendar"
locale
=
"#{calendarBean.locale}"
popup
=
"#{calendarBean.popup}"
datePattern
=
"#{calendarBean.pattern}"
showApplyButton
=
"#{calendarBean.showApply}"
cellWidth
=
"24px"
cellHeight
=
"22px"
style
=
"width:200px"
disabled
=
"#{calendarBean.disabled}"
>
</
rich:calendar
>
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?