• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF with RichFaces Calendar

 
Jyosthna Jaladi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic