问题
I use a rich:calendar component and my method, which is registered at the attribute "valueChangeListener" is only fire, if a insert a new date manually. But if i used the small preview calendar of this component, nothing will be fired.
With small preview calendar i means something like in this richfaces demo: http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf;jsessionid=5F76DD93066405333AE0F8F7706AE441?c=calendar&tab=usage
I use Richfaces 3.3.*
<rich:calendar id="Date"
value="#{bean.date}"
popup="true" datePattern="dd.MM.yyyy" enableManualInput="true"
ajaxSingle="true" buttonIcon="/img/calendar.png"
immediate="true"
valueChangeListener="#{bean.changeDate}"
onchanged="updateDateInSectionA(this.value).text;"
oninputblur="updateDateInSectionA(this.value).text;" >
<a4j:support event="onchanged" ajaxSingle="true"
reRender="section_A"
actionListener="#{bean.doSomeThingElse}"
valueChangeListener="#{bean.changeDate}" />
<a4j:support event="oninputchange" ajaxSingle="true"
reRender="section_A"
actionListener="#{bean.doSomeThingElse}"
valueChangeListener="#{bean.changeDate}" />
<a4j:support event="oninputkeyup" ajaxSingle="true"
reRender="section_A"
actionListener="#{bean.doSomeThingElse}"
valueChangeListener="#{bean.changeDate}" />
</rich:calendar>
The code in valueChangeListener wasn´t executed, but why?
回答1:
i did such a thing and it worked as you said:
<rich:calendar id="test" value="#{mybean.date}"> <a4j:support event="onchanged"
ajaxSingle="true" reRender="xxform" valueChangeListener="#{mybean.date}" />
</rich:calendar>
来源:https://stackoverflow.com/questions/21285781/which-richcalendar-event-will-be-fired-by-changing-a-date-value-in-the-small-pr