Opened 6 years ago

Closed 6 years ago

#17386 closed feature (invalid)

dojo/Stateful: add a setOptions({}) function

Reported by: raupp Owned by: Kris Zyp
Priority: undecided Milestone: tbd
Component: Core Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:

Description

there are some reason for the "Stateful" don't implement a "SetOptions?" function like that:

setOptions: function(options){
                if(dojo.isObject(options)){
                    for(opt in options){
                        this.set(opt, options[opt])
                    }
                }
            }

This function will help when data come server, for example, and need to be reflected on widget that uses one stateful as base.

Change History (4)

comment:1 Changed 6 years ago by bill

Component: OperationsCore
Owner: set to Kris Zyp
Status: newassigned
Type: defectfeature

dijit/_WidgetBase does this via set() but for some reason Kris didn't copy that functionality when he made dojo/Stateful.

comment:2 Changed 6 years ago by ben hockey

Stateful has supported foo.set(options); for more than 3 years (https://github.com/dojo/dojo/blob/418a356902586a2644e7d9d6920587101b83187c/Stateful.js#L51-L56) but is this a request for something else?

comment:3 Changed 6 years ago by raupp

My bad! I really didn't see this in dojo/Stateful. Please ignore this ticket. I promise I will be more careful next time.

comment:4 Changed 6 years ago by ben hockey

Resolution: invalid
Status: assignedclosed
Note: See TracTickets for help on using tickets.