Results 1 to 2 of 2

Thread: Custom views: when to use config?

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2010
    Omaha, NE
    Vote Rating

    Default Custom views: when to use config?

    So several of us here are trying to figure out when properties should go into config and when they should be at the class level? A lot of the examples show the entire view being built inside config. It appears this doesn't work with dynamic data but maybe we're missing something? For dynamic views we are doing:

    config: {}
    initialize: funciton() {
    buildItems: function() {
        return { view stuff }
    So is there an easy rule of thumb on what does into config and what goes at the class level? We thought maybe anything that could be changed after creation goes into config. Maybe there's a good write up on this and we just haven't found it?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    The config object is great if you want the whole getter/setter architecture that comes along with them. That's the thing that I use it most for. I put everything in the config personally.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts