tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ffa...@apache.org
Subject svn commit: r1325308 - /tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js
Date Thu, 12 Apr 2012 15:07:44 GMT
Author: ffacon
Date: Thu Apr 12 15:07:43 2012
New Revision: 1325308

URL: http://svn.apache.org/viewvc?rev=1325308&view=rev
Log:
TAP5-1844 : Datefield value must be validated after change

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js?rev=1325308&r1=1325307&r2=1325308&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js
Thu Apr 12 15:07:43 2012
@@ -114,8 +114,14 @@ Tapestry.DateField = Class.create({
             var date = this.datePicker.getDate();
 
             var resultHandler = function(result) {
-                this.field.value = result;
-
+				//TAP5-1844
+                if (this.field.value != result) { 
+						this.field.value = result;
+						Tapestry.currentFocusField = this.field;
+						//fire an FOCUS_CHANGE_EVENT event to force inputValidation on field
+						document.fire(Tapestry.FOCUS_CHANGE_EVENT, this.field);
+						 
+ 				} 
                 this.hidePopup();
 
                 new Effect.Highlight(this.field);



Mime
View raw message