-
1. Re: How do i call a method of my backing bean when i clean date in rich:calender component
ilya_shaikovsky Apr 28, 2010 4:40 AM (in response to sathishavunoori)you could use onchanged event(risen when calendar control used for update date) and oninputchange event (to handle tyoing in input). In the events you should check the current value and if it's empty - rise request using jsFunction.
-
2. Re: How do i call a method of my backing bean when i clean date in rich:calender component
sathishavunoori Apr 28, 2010 6:24 AM (in response to ilya_shaikovsky)thanks for your helpful information.
i have already using onchanged event like as follows,
<rich:calendar id="ata2" value="#{_voyagePort.ata}" datePattern="MM/dd/yyyy hh:mm a" > <a4j:support immediate="false" event="onchanged" reRender="atamsg" actionListener="#{itVoyagePortAction.validateata}" oncomplete="if (#{facesContext.maximumSeverity!=null}) #{rich:component('editCargoPosition')}.show();" ajaxSingle="true"/> </rich:calendar>
when i change another date or select a new one the onchanged event is raising and validateata() method was calling successfully ,but when i am going to clean the date field in rich:calender ,the date was removed from my xhtml file but validateata() method was not calling at that time .
am i any thing wrong with this?
regards
sathish
-
3. Re: How do i call a method of my backing bean when i clean date in rich:calender component
ilya_shaikovsky Apr 28, 2010 6:43 AM (in response to sathishavunoori)hmm.. I made very simple test at richfaces-demo environment (latest 3.3.3)
<rich:calendar value="#{calendarBean.selectedDate}" locale="#{calendarBean.locale}" showWeeksBar="false" popup="#{calendarBean.popup}" datePattern="#{calendarBean.pattern}" showApplyButton="false" cellWidth="24px" cellHeight="22px" style="width:200px"> <a4j:support event="onchanged" action="#{userBean.action}"/> </rich:calendar>
and
public void action() { System.out.println("UserBean.action()"); }
and after selecting date I see log output and after clicking clear - see it also.
-
4. Re: How do i call a method of my backing bean when i clean date in rich:calender component
sathishavunoori May 25, 2010 9:27 AM (in response to ilya_shaikovsky)thanks ilya,
i tried again it is working fine . sorry for the late reply,
thanks for your great post