Ticket #4547 (new enhancement)
Form.js - setValue with component expecting an array does not work
| Reported by: | guest | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0 |
| Component: | Dijit | Version: | 0.9 |
| Severity: | normal | Keywords: | |
| Cc: | keith.long@… |
Description (last modified by bill) (diff)
When Calling setValue with a component expecting an array the form logic does not work.
In my example I'am passing in an Object with a parameters of Roles
Object o = new Object(); o.roles = new Array(2); o.roles[0] = 'Admin'; o.roles[1] = 'User'; <input name="roles" dojoType="wcg.picus.user.UserRolePane">
The component will be passed a single object with the String admin instead of the Roles Array.
The problem is caused by the form-code treating Arrays Differently to other Objects. I tracked the bug down to the following code:
if(!dojo.isArray(values)){
values = [ values ];
}
on Replacing this with
//if(!dojo.isArray(values)){
values = [ values ];
//}
The bug is fixed.
I'am marking this as a critical, as the form logic is useless for our project without the fix.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.