Opened 10 years ago
Closed 9 years ago
#13469 closed defect (invalid)
dojox.form.Manager.reset() exception
Reported by: | vtsuper | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | blocker | Milestone: | 1.8 |
Component: | DojoX Form | Version: | 1.6.1 |
Keywords: | dojox.form.manager reset | Cc: | |
Blocked By: | Blocking: |
Description
the form is create by dojox.form.manager. dijit.form.FilteringSelect? required=false
when I reset the form without select any options in filtering select, the js error will prompt
if I select a option in filtering select and type something in other textbox, and then reset the form, only filteringSelect value will be clear, the textbox value won't be reset
Attachments (4)
Change History (13)
Changed 10 years ago by
Attachment: | sample.html added |
---|
Changed 10 years ago by
Attachment: | states.json added |
---|
Changed 10 years ago by
comment:1 Changed 10 years ago by
Component: | Dijit - Form → DojoX Form |
---|---|
Keywords: | dijit.form.FilteringSelect required false removed |
Owner: | changed from Douglas Hays to Eugene Lazutkin |
comment:2 Changed 10 years ago by
Summary: | reset dijit.form.filteringSelect error → dojox.form.Manager.reset() exception |
---|
comment:3 Changed 9 years ago by
http://dojo-toolkit.33424.n3.nabble.com/FilteringSelect-reset-issue-td3384353.html
Accroding to the suggestion by neonstalwart, this bugs seems solved if you set the default value to 'undefined'
new dijit.form.FilteringSelect?({name:"shop_id", title:'Shop:', store: _store, required:false, value:undefined}
So is it we better put the 'undefined' become the default value of dijit.form.FilteringSelect? then everything will work perfect?
comment:4 Changed 9 years ago by
Noting that the FilteringSelect? widget does not require value:undefined and reset works without error when not using dojox.form.manager.
comment:7 Changed 9 years ago by
It looks like there are two problems: one with the sample.html, another is a bug in Form Manager. The corrected sample is attached (instead of onClick
handlers you should mark a reset button as a type="reset"
and a submit button as a type="submit"
).
comment:8 Changed 9 years ago by
Actually both problems can be fixed with a sample.html change. The text widget is ignored because it has empty name, and Form Manager ignores such fields as untransmittable. I don't know if a widget should honor name
specified in a markup or not, but if you specify it directly the problem is gone. See the attached file.
comment:9 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Resolution: | → invalid |
Status: | new → closed |
The second problem about the textbox not being reset is a user error. The name attribute is not automatically picked up from markup but should be specified in the constructor args just like FilteringSelect?. The xhr cancelled is not a dijit.form issue but dojox.form related.