my dog learned polymorphism*
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF with RichFaces Calendar" Watch "JSF with RichFaces Calendar" New topic
Author

JSF with RichFaces Calendar

Jyosthna Jaladi
Greenhorn

Joined: Apr 21, 2008
Posts: 1
Hi,

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"
value="#{srvcPrvdrAppointmentsBean.toDate}"
datePattern="MM/dd/yyyy"></rich:calendar>
<hutputText styleClass="usrRegParms" value="From Date"></hutputText>
<rich:calendar id="fromdate" value="#{srvcPrvdrAppointmentsBean.fromDate}"
datePattern="MM/dd/yyyy"></rich:calendar>

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

</a4jutputPanel>
</h:form>

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

Jyosthna
[ 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: http://aspose.com/file-tools
 
subject: JSF with RichFaces Calendar