The implementation shown in the code snippet seems OK. In order to find out why the code does not work, we will need a repro project. I will suggest you create a simple Dojo
demo (in this case server wrapper is irrelevant). Thus will be able to investigate the issue further.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.