View Full Version : Dynamically populating the panel?
26 Jan 2012, 1:44 AM
How can we dynamically populate items in the panel from the database ? Also if I add a new field in the UI, it should be automatically added in the database and then fetched as an item of the panel.
Thanks in advance.
27 Jan 2012, 1:39 PM
I suggest reading up on the component lifecycle as well as container add/remove. Check out the guides for these types of documents.
28 Jan 2012, 5:19 AM
Typical steps are:
1. From the UI, make an Ajax call to read the config object from the database
2. In the success callback, instantiate the appropriate ExtJS component by passing the read config information
3. Add the newly created component to the appropriate container
In case you are defining your own component and want to encapsulate this behavior inside it, then you may put the logic inside the initComponent or onRender methods of your component depending upon your application design.
Powered by vBulletin® Version 4.1.5 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.