Thursday, November 1, 2007

New dojo widget

So, it occurs to me that the extremely lazily loading FilteringSelect is something I might want to use in the future, so I'm making a new dojo widget. What it will do is accept an (optional) initial label and value, and that will show up. getValue returns the value, isValid returns true, all that goodness. But when you go to change the widget (click on it, etc.) it'll call the function you gave it as its storeGen attribute to create its store. I.E., the store does not get created until you need it. I'll call it (dun dun dun!) cs.dijit.form.LazyFilteringSelect. :)

Edit: A couple more features. setValue will simply set what gets returned by getValue, and setDisplayedValue will simply set the label (no lookups) UNTIL either you try to change the widget or you call widget.loadStore();

No comments: