O'Reilly logo

Sencha Touch Cookbook - Second Edition by Ajit Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding items to a container at runtime

In an application, there will be numerous scenarios where we will have to add components (ranging from a simple field to a panel) at runtime as part of the response to a user event. For example, your application may have a payment panel where you may want to show the payment-specific detail panels, which depend on the payment method. If a user selects Credit Card as the payment method, you may want to show a panel asking the user to enter their credit card details. This requires us to add components dynamically to an existing container. In this recipe, we will see how to work with the components at runtime.

Getting ready

Make sure you have set up your development environment by following the recipes outlined ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required