| 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"> <a4j utputPanel ajaxRendered="true"> <h:inputText id="staffMember" value="#{srvcPrvdrAppointmentsBean.staffMember}"/> <rich:calendar id="todate" value="#{srvcPrvdrAppointmentsBean.toDate}" datePattern="MM/dd/yyyy"></rich:calendar> <h utputText styleClass="usrRegParms" value="From Date"></h utputText> <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}" /> </a4j utputPanel> </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
|
 |
 |
|
|
subject: JSF with RichFaces Calendar
|
|
|