When creating real-world applications with Ext JS, it is often the case that we don't know how forms and UI elements are going to look at design time and so must be generated at runtime, based on data stored in a database.
In the previous chapter we looked at dynamically creating components from configurations loaded directly from the server. In this recipe, we will go into more detail by looking at how to create checkbox groups which are often required to be generated from lists of possible values stored in a database.
Imagine you are creating a social networking website and are creating an area where users can send a message to one or more of their friends by ticking a checkbox beside their name to include them in the recipients list. Obviously the number of friends and who they are will be different for each user and will also change over time.
This is a prime example of where this technique will be needed. We will demonstrate it in this recipe...