The following represents a more complex widget created with dijit.Declaration. Take a look at the source to see how it works.