[
https://jira.jboss.org/jira/browse/RF-5270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ilya Shaikovsky resolved RF-5270.
---------------------------------
Resolution: Rejected
use onchanged instead of ondateselected.
We call dateselected event after the date selected but it could be risen before
the date actually set in input (in case when apply button present)
ocnhanged fired after any date or time changed - after the changes was set to
input.
> Calendar sets out-of-time value
> -------------------------------
>
> Key: RF-5270
> URL: https://jira.jboss.org/jira/browse/RF-5270
> Project: RichFaces
> Issue Type: Bug
> Components: planning_all
> Affects Versions: 3.2.1, 3.2.2
> Environment: RichFaces 3.2.1.GA (and 3.2.2.SR1), Seam Runtime
> 2.0.2.SP1, EnterprisePlatform-4.3.0.GA, JRE 1.6.0_04, Windows 2K, viewed in
> Firefox 3.0.4, IE 6.0.2800.
> Reporter: Alexander Kiselyov
> Assignee: Pavel Yaschenko
> Priority: Critical
> Fix For: 3.3.0
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> Hi. I've found one unpleasant pecularity of <rich:calendar> component's
> behavior. When I've added <a4j:support> into this component (to submit it's
> value immediate after changing), my setter became to receive old values from
> calendar. I've made test bean and page, to check this situation:
> /*******************************************************************************/
> // Interface
> /*******************************************************************************/
> import java.util.Date;
> import javax.ejb.Remote;
> @Remote
> public interface Experimental {
> public Date getTestDate();
> public void setTestDate(Date testDate);
> }
> /*******************************************************************************/
> //Actually bean
> /*******************************************************************************/
> import java.util.Date;
> import org.jboss.seam.ScopeType;
> import org.jboss.seam.annotations.AutoCreate;
> import org.jboss.seam.annotations.Name;
> import org.jboss.seam.annotations.Scope;
> @Scope(ScopeType.SESSION)
> @AutoCreate
> @Name("experimentalBean")
> public class ExperimentalBean implements Experimental {
> private Date testDate = null;
> public Date getTestDate() {
> return testDate;
> }
> public void setTestDate(Date testDate) {
> this.testDate = testDate;
> System.out.print("!!!!" + testDate);
> }
>
> }
> <!--
> *******************************************************************************
> -->
> <!-- Test page: -->
> <!--
> *******************************************************************************
> -->
> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:s="http://jboss.com/products/seam/taglib"
> xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:rich="http://richfaces.org/rich"
> template="layout/template.xhtml"
> xmlns:a4j="http://richfaces.org/a4j">
> <ui:define name="body">
>
> <rich:panel>
> <f:facet name="header">
> <h:outputText style="font-weight:bold;"
> value="Test" />
> </f:facet>
> <h:form>
> <rich:calendar id="testDate"
> showApplyButton="false"
> value="#{experimentalBean.testDate}">
> <a4j:support ajaxSingle="true"
> event="ondateselected" />
> </rich:calendar>
> </h:form>
> </rich:panel>
> </ui:define>
> </ui:composition>
> So, I've done next things: 1. Walked to the page;
> 2. Set calendar's date to December 4th, 2007;
> 3. Set calendar's date to December 2nd, 2007;
> 4. Set calendar's date to December 16th, 2011 year.
> And what I've got in server's log:
> 15:08:28,746 INFO [STDOUT] !!!!null
> 15:08:28,746 INFO [STDOUT] !!!!null
> 15:09:16,515 INFO [STDOUT] !!!!Tue Dec 04 00:00:00 EET 2007
> 15:09:16,515 INFO [STDOUT] !!!!Tue Dec 04 00:00:00 EET 2007
> 15:10:16,401 INFO [STDOUT] !!!!Sun Dec 02 00:00:00 EET 2007
> 15:10:16,401 INFO [STDOUT] !!!!Sun Dec 02 00:00:00 EET 2007
> So, as you can see, setter receives old value... Similary results I've got
> while developing of project, during which I've found this bug.
> P.S. I've used different values of a4j:support's "event" attribute, including
> even "oncomplete", and result remains the same.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/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