1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Ireland
    Posts
    6
    Vote Rating
    0
    Gaelmart is on a distinguished road

      0  

    Default Overriding & dynamic items in config

    Overriding & dynamic items in config


    Hi
    This should be simple & common task I think but I'm on learning curve.

    There is a lovely image zoom control below which I can work outside of SA but I need to...

    Dynamically change the images (items) & number of.

    I've got the data worked out, meaning I know how to show database stuff in a LIST control. Not sure how to loop/add items: [ .... xtype: 'imageviewer',..... ]

    http://www.sencha.com/forum/showthre...ing-fine/page4

    SA FILE:
    --------------------------------------------------------------------
    Code:
    Ext.define('BoilerShop.view.DiagramCarousel', {
        extend: 'Ext.carousel.Carousel',
        alias: 'widget.diagramcarousel',
    
    
        config: {
            listeners: [
                {
                    fn: 'onCarouselActiveItemChange',
                    event: 'activeitemchange'
                },
                {
                    fn: 'onCarouselResize',
                    event: 'resize'
                }
            ]
        },
    
    
        onCarouselActiveItemChange: function(container, value, oldValue, options) {
            if(oldValue){
                oldValue.resetZoom();
                this.getActiveItem().resize();
            }
    
    
        },
    
    
        onCarouselResize: function(component, options) {
            this.getActiveItem().resize();
        }
    
    
    });


    Override file
    -------------------------------------
    Code:
    Ext.define('BoilerShop.OverrideDiagramCarousel', {
     override: 'BoilerShop.view.DiagramCarousel',
      
     
        config: {
            
              items: [
                        {
                            xtype: 'imageviewer',
                            style: {
                                backgroundColor: '#222'
                            },
                            imageSrc: 'http://www.ibasis.co.uk/Uploads/SAUNIER DUVAL/1281301.png'
                        },
                        {
                            xtype: 'imageviewer',
                            style: {
                                backgroundColor: '#222'
                            },
                            imageSrc: 'http://www.ibasis.co.uk/Uploads/SAUNIER DUVAL/1281302.png'
                        },
                        {
                            xtype: 'imageviewer',
                            style: {
                                backgroundColor: '#222'
                            },
                            imageSrc: 'http://www.ibasis.co.uk/Uploads/SAUNIER DUVAL/1281303.png'
                        },
                         {
                            xtype: 'imageviewer',
                            style: {
                                backgroundColor: '#222'
                            },
                            imageSrc: 'http://www.ibasis.co.uk/Uploads/SAUNIER DUVAL/1281304.png'
                        },
                         {
                            xtype: 'imageviewer',
                            style: {
                                backgroundColor: '#222'
                            },
                            imageSrc: 'http://www.ibasis.co.uk/Uploads/SAUNIER DUVAL/1281305.png'
                        }
                        
                    ]
     
      },
      constructor: function (config) {
             this.callParent(arguments); // calls Ext.tip.ToolTip's constructor
            alert('This gets shown so were ok here');
         }
         
    });

    Thanks

    Gary
    Last edited by aconran; 21 May 2012 at 10:34 AM. Reason: add code tags

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    120
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Not sure I understand the question...
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi