File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes JSF with RichFaces Calendar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF with RichFaces Calendar" Watch "JSF with RichFaces Calendar" New topic

JSF with RichFaces Calendar

Jyosthna Jaladi

Joined: Apr 21, 2008
Posts: 1

I am facing a issue when i use richfaces calendar with JSF. When i have richfaces calendar in the form <h:commandButton> is not invoking the action method. When i have changed the <h:commandButton> to <a4j:commandButton>, action method is getting invoked, but all the form elements are null in the backend bean method (searchAppt) though i enter some values.

Here is the code
<h:form id="srvcPrvdrAppointmentsfrm">
<a4jutputPanel ajaxRendered="true">
<h:inputText id="staffMember" value="#{srvcPrvdrAppointmentsBean.staffMember}"/>
<rich:calendar id="todate"
<hutputText styleClass="usrRegParms" value="From Date"></hutputText>
<rich:calendar id="fromdate" value="#{srvcPrvdrAppointmentsBean.fromDate}"

<a4j:commandButton ajaxSingle="true" id="searchCmd" reRender="myAppts"
value="Search" action="#{srvcPrvdrAppointmentsBean.searchAppt}"


I am new to richfaces and JSF. Any help will be greatly appreciated.

[ April 21, 2008: Message edited by: Jyosthna Jaladi ]
Saravanan Vijayappan
Ranch Hand

Joined: Jan 02, 2007
Posts: 47
You need to set up ajaxSingle="false" in <a4j:commandButton> UI component to submit all the form fileds to backing bean. ajaxSingle="true" prevents to submit form parameters so that you see null values in your backing bean.

Yes. you might need to use <a4j:commandButton> when you use rich faces components in the form.

Cheers,<br />Sarav
I agree. Here's the link:
subject: JSF with RichFaces Calendar
It's not a secret anymore!