jayferd/ember.js — pull request #1 by AgileMantis (2012-07-10 15:20:18+00:00)
Title: Feature/radio button group

Solved issue with RadioButtonGroup "selectedValue" being set prior to DOM Insert (buttons were not yet inserted, and thus the set failed). Changed setter in selectedValue to cache the value if the view's "didInsertElement" has not yet been called. Added code in "didInsertElement" to then call "selectedValue" setter if a cached value exists. All calls to "selectedValue" setter post render still work.

I'd prefer another approach though. I'd rather wrap the code in the setter into a function and queue it somehow to fire after the RadioButtonGroup has been inserted into the DOM. This would make the code much much cleaner (removing the two added properties, the check in didInsertElement and the if/else logic in the setter). I feel such a solution would be less brittle, less buggy and easier for maintainers to digest. However, I'm not familiar enough with Ember to walk this path. Thoughts?