#2244 closed defect (fixed)
Using <dojo:combobox>, 'name' attribute does not exist
Reported by: | Owned by: | Douglas Hays | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.4.1 |
Keywords: | dojo: firefox name comboBox | Cc: | |
Blocked By: | Blocking: |
Description
When using a comboBox with a tag of <dojo:combobox />, the form is not submitted with the proper name of the comboBox element. Instead of the proper POST variable with the name of the comboBox, 'undefined' and 'undefined_selected' are posted.
Combobox.js has
659 if (! this.name && source.name){ this.name = source.name; }
where source is the fragment of the DOM node.
Since this comboBox was constructed from the dojo:comboBox style, the fragment is empty, and the args have the attributes of the node.
In widget.js:
677 var localProperties = localProps || parser.parseProperties(frag[frag["ns"]+":"+stype]);
An example tag of:
<dojo:comboBox mode="remote" maxListLength="15" autoComplete="true" dataUrl="/search/UserSearch/user/%{{searchString}}" id="userName" name="userName" widgetId="userName" />
will show the error. 'undefined' and 'undefined_selected' will be posted, and not 'userName' and 'userName_selected'.
My apologies for how poorly I am able to describe the problem. I'm reasonably unfamiliar with dojo and javascript, and if any clarification is needed, I am CrimsonKing? in #dojo.
A simple (but hackish) fix to the bug would be to change comboBox.js to:
658 if (! this.name && source.name){ this.name = source.name; } 659 else if (args.name) { this.name = args.name; }
Change History (3)
comment:1 Changed 14 years ago by
Owner: | changed from bill to Douglas Hays |
---|
As you can see, I set some random states in the AutoCompleter? test and here is what I got:
state=Arkansas&foo.bar=New+York&foo.bar=Nevada&foo.bar=Nebraska&foo.bar=Arkansas&prog=Vermont