Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    16
    Vote Rating
    0
    tbleckert is on a distinguished road

      0  

    Default Dynamic carousel

    Dynamic carousel


    Hi! Just started with models by following the MVC tutorial, so I ended up with this list:

    Code:
    expolinc.views.ProductsList = Ext.extend(Ext.Panel, {
        dockedItems: [{
            xtype: 'toolbar',
            title: 'Products'
        }],
        items: [{
            xtype: 'list',
            store: expolinc.stores.products,
            itemTpl: '{name} {imagesrc}',
            onItemDisclosure: function (record) {
                Ext.dispatch({
                    controller: expolinc.controllers.products,
                    action: 'show',
                    id: record.getId()
                });
            }
        }],
        initComponent: function() {
            expolinc.stores.products.load();
            expolinc.views.ProductsList.superclass.initComponent.apply(this, arguments);
        }
    });
    But I've tried for like an hour now to transform this into a carousel, can anyone give me a hand?
    Thanks!

  2. #2
    Sencha User gcallaghan's Avatar
    Join Date
    Apr 2010
    Location
    Cupertino, Ca
    Posts
    247
    Vote Rating
    0
    gcallaghan is on a distinguished road

      0  

    Default


    How do you want to change this into a carousel? A carousel has an item per page.

    from the docs:
    http://dev.sencha.com/deploy/touch/docs/
    Code:
    var carousel = new Ext.Carousel({
        items: [
            {
                html: '<p>Navigate the carousel on this page by swiping left/right.</p>',
                cls : 'card card1'
            },
            {
                html: '<p>Clicking on either side of the indicators below</p>',
                cls : 'card card2'
            },
            {
                html: 'Card #3',
                cls : 'card card3'
            }
        ]
    });
    You could use the initComponent overloading and the Carousel's add function to add components to from the store.

    i.e.
    Code:
    initComponent:function(){
        ...
        var me = this;
        expolinc.stores.products.each(function(item){
            me.add({html:'<div>'+item.name+'</div>'});
        });
        me.doComponentLayout();
    }

  3. #3
    Sencha User
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    16
    Vote Rating
    0
    tbleckert is on a distinguished road

      0  

    Default


    Yes, I know that the Carousel has items, so does the list. Therefore, the list items becomes carousel items Will try your code and get back to you. Thanks!

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    2
    Vote Rating
    0
    SixteenBits is on a distinguished road

      0  

    Default


    Code:
    initComponent:function(){
        ...
        var me = this;
        expolinc.stores.products.each(function(item){
            me.add({html:'<div>'+item.name+'</div>'});
        });
        me.doComponentLayout();
    }
    Hi i've tried this exemple it did not worked. in another hand it does work when i put it with an event trigger
    Code:
    this.on('show', function() {            
    var me = this;
    ...
    });
    but i don't wana do it on 'show' event, i need to do it only one time when the view is created.

    thanks !

  5. #5
    Sencha User
    Join Date
    May 2011
    Posts
    12
    Vote Rating
    0
    Champi is on a distinguished road

      0  

    Default


    Probably missing the myComponent.superclass.initComponent.apply(this,arguments)

Similar Threads

  1. 'Pulse' like interface - carousel in carousel
    By TrentMav in forum Sencha Touch 1.x: Examples and Showcases
    Replies: 5
    Last Post: 10 Feb 2012, 1:59 AM
  2. Problem with dynamic carousel
    By Shijutv in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 10 Nov 2011, 4:53 PM
  3. Create Carousel with dynamic data
    By sj_tt6 in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 18 Nov 2010, 11:49 AM
  4. Broken in 1.0RC? Carousel with dynamic card content used to work until 1.0RC
    By mnjacobs in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 10 Nov 2010, 9:46 AM
  5. [OPEN] [FIXED-110] Carousel indicator breaks down after changing carousel content.
    By Mphasize in forum Sencha Touch 1.x: Bugs
    Replies: 6
    Last Post: 1 Jul 2010, 11:41 AM

Thread Participants: 3

Tags for this Thread