Create LifeCycle of a Widget in DOJO