Which rich:calendar event will be fired by changing a date value in the small preview calendar?

只愿长相守 提交于 2019-12-24 14:28:14

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!