There is a similar example in the Sencha Touch cookbook....

:-)