Calendar: ValueChangeListener called twice on first request only.
-----------------------------------------------------------------

                 Key: RF-3764
                 URL: http://jira.jboss.com/jira/browse/RF-3764
             Project: RichFaces
          Issue Type: Bug
    Affects Versions: 3.2.1
            Reporter: Ilya Shaikovsky
         Assigned To: Nick Belaevski


I'm using

                <rich:calendar value="#{calendarBean.selectedDate}"
                        popup="false" showApplyButton="false" 
                        cellWidth="120px" cellHeight="120px" 
                        boundaryDatesMode="none" showWeeksBar="false" 
                        dataModel="#{calendarDataModel}" 
oncurrentdateselect="return false" id="calendar" 
valueChangeListener="#{calendarDataModel.valueChanged}">
                        <f:facet name="header">
                                <h:outputText value="{currentMonthControl}"/>
                        </f:facet>
                        <a4j:outputPanel layout="block" id="cell">
                                <h:panelGrid columns="1">
                                        <h:outputText value="{day}" 
style="align:center"/>
                                        <h:outputText 
value="{data.shortDescription}"/>
                                        <h:outputText 
value="{data.description}"/>
                                </h:panelGrid>
                        </a4j:outputPanel>
                        <a4j:support event="onchanged" 
oncomplete="#{rich:component('panel')}.show()" reRender="editContent"/>
                </rich:calendar>

So after I select the date first time - I could see in debug that my 
valueChangeListener called twice - first time newValue is ok and the second 
time - its' wrong.
After all next requests all is fine.

Nick I want to add organiser sample to demo till release. So could you fix this 
in this release?

I've asked Alex Kushunin and checked the rendererBase code and think you need 
to review next code:

                if (currentDateString != null) {
                        CurrentDateChangeEvent ev = new 
CurrentDateChangeEvent(component,
                                        currentDateString);
                        ev.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
                        ev.queue();

                        // TODO nick - nick - queue this event when 
ValueChangeEvent is
                        // queued?
                        new AjaxEvent(component).queue();

                }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to