You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/09/17 15:23:04 UTC

[jira] [Closed] (TAP5-2492) No change event when datePicker updates t:datefield

     [ https://issues.apache.org/jira/browse/TAP5-2492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Kemnade closed TAP5-2492.
--------------------------------
    Resolution: Duplicate

> No change event when datePicker updates t:datefield 
> ----------------------------------------------------
>
>                 Key: TAP5-2492
>                 URL: https://issues.apache.org/jira/browse/TAP5-2492
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Svein
>
> When fields in my side panel are updated, I call submit on the change event. If datePicker is used no change event are fired.
> One line added by me: _this.field.$.change();
> Controller.prototype.onSelect = function() {
>   var date;
>   date = this.datePicker.getDate();
>   if (date === null) {
>     this.hidePopup();
>     this.clearFieldError();
>     this.field.value("");
>     return;
>   }
>   this.field.addClass("ajax-wait");
>   return ajax(this.container.attr("data-format-url"), {
>     data: {
>       input: date.getTime()
>     },
>     failure: (function(_this) {
>       return function(response, message) {
>         _this.field.removeClass("ajax-wait");
>         return _this.fieldError(message);
>       };
>     })(this),
>     success: (function(_this) {
>       return function(response) {
>         _this.field.removeClass("ajax-wait");
>         _this.clearFieldError();
>         _this.field.value(response.json.result);
>         //trigger change event on field
>         _this.field.$.change();
>         return _this.hidePopup();
>       };
>     })(this)
>   });
> };



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)