Opened 8 years ago

Closed 8 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)

sample.html (1.9 KB) - added by vtsuper 8 years ago.
states.json (3.7 KB) - added by vtsuper 8 years ago.
err.JPG (27.8 KB) - added by vtsuper 8 years ago.
sampleCorrected.html (1.8 KB) - added by Eugene Lazutkin 8 years ago.
the correct version.

Download all attachments as: .zip

Change History (13)

Changed 8 years ago by vtsuper

Attachment: sample.html added

Changed 8 years ago by vtsuper

Attachment: states.json added

Changed 8 years ago by vtsuper

Attachment: err.JPG added

comment:1 Changed 8 years ago by Douglas Hays

Component: Dijit - FormDojoX Form
Keywords: dijit.form.FilteringSelect required false removed
Owner: changed from Douglas Hays to Eugene Lazutkin

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.

comment:2 Changed 8 years ago by Douglas Hays

Summary: reset dijit.form.filteringSelect errordojox.form.Manager.reset() exception

comment:3 Changed 8 years ago by vtsuper

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 8 years ago by Douglas Hays

Noting that the FilteringSelect? widget does not require value:undefined and reset works without error when not using dojox.form.manager.

comment:5 Changed 8 years ago by vtsuper

I see, then it should be the problem of dojox.form.manager...thx

comment:6 Changed 8 years ago by Colin Snover

Priority: highblocker

Bulk update of open ticket priorities.

comment:7 Changed 8 years ago by Eugene Lazutkin

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 8 years ago by Eugene Lazutkin

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.

Changed 8 years ago by Eugene Lazutkin

Attachment: sampleCorrected.html added

the correct version.

comment:9 Changed 8 years ago by Eugene Lazutkin

Milestone: tbd1.8
Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.