Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14349 closed defect (fixed)

[patch][cla] MVC - the valid binding does not validate the widget

Reported by: ben hockey Owned by: Ed Chatelain
Priority: high Milestone: 1.7.1
Component: DojoX MVC Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking:

Description

from the mailing list:

Page contains two fields, if i set field "Number 1" to same value as field "Number 2", both fields are correctly disabled. If i set greater value, both should by marked as invalid. But this is not working

Attachments (2)

14349.html (1.6 KB) - added by ben hockey 8 years ago.
14349.patch (7.6 KB) - added by Ed Chatelain 8 years ago.
Here is a patch with Ben's fix and a doh test for this. Ben if this looks ok, and you want to commit this please do, if not I will find someone else to do it.

Download all attachments as: .zip

Change History (12)

Changed 8 years ago by ben hockey

Attachment: 14349.html added

comment:1 Changed 8 years ago by ben hockey

a possible patch (fixes this issue but haven't run the tests with it)

  • mvc/_DataBindingMixin.js

     
    267267                                       // 2. valid - default "true"
    268268                                       binding.watch("valid", function (name, old, current){
    269269                                               pThis._updateProperty(name, old, current, true);
    270                                                if(current !== pThis.get("binding").get(name)){
     270                                               if(current !== pThis.get(name)){
    271271                                                       if(pThis.validate && lang.isFunction(pThis.validate)){
    272                                                                pThis.validate(true);
     272                                                               pThis.validate();
    273273                                                       }
    274274                                               }
    275275                                       }),

comment:2 Changed 8 years ago by ben hockey

Summary: MVC - the valid binding does not validate the widget[patch][cla] MVC - the valid binding does not validate the widget

comment:3 Changed 8 years ago by Ed Chatelain

Thanks Ben, I will test this out soon.

Changed 8 years ago by Ed Chatelain

Attachment: 14349.patch added

Here is a patch with Ben's fix and a doh test for this. Ben if this looks ok, and you want to commit this please do, if not I will find someone else to do it.

comment:4 Changed 8 years ago by Ed Chatelain

Should we push this fix back into the 1.7 branch too?

comment:5 Changed 8 years ago by ben hockey

we might as well put it in the 1.7 branch - i don't see why not. i'll try to commit this today sometime. no need to find someone else to do it.

comment:6 Changed 8 years ago by ben hockey

In [27236]:

dojox/mvc: fix valid binding to call validate on the widget.
refs #14349

comment:7 Changed 8 years ago by ben hockey

Resolution: fixed
Status: newclosed

In [27237]:

dojox/mvc: port r27236 to 1.7 branch. fixes #14349

comment:8 Changed 8 years ago by ben hockey

Milestone: 1.7.1

comment:9 Changed 8 years ago by ben hockey

ed,

i just realized that i didn't give you any credit in the commit message. sorry about that.

comment:10 Changed 8 years ago by Ed Chatelain

Hi Ben,

No worries about that, thanks for committing it.

Note: See TracTickets for help on using tickets.