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
    Apr 2011
    Posts
    14
    Vote Rating
    0
    isibbot is on a distinguished road

      0  

    Default Carousel, tpl and store

    Carousel, tpl and store


    I realise that this question has been asked before, but there apears to be little definition I can find.

    I have created an app using the mvc suggested in many of the videos and tuts. I cant seem to fathom how to link up the results of a store thats grabbing xml to a carousel, via a template.

    My 'weak' attempt is below.


    Code:
    // The model
    Ext.regModel("brochure.models.carouselData", {
        fields: [
          {name: 'content',  type: 'string'},
        ]
     
    //The Store
    brochure.stores.carouselData = new Ext.data.Store({
     model: 'brochure.models.carouselData',
     autoLoad: true,
     proxy: {
      type: 'ajax',
      url: 'resource/xml/data.xml',
      reader: {
       type: 'xml',
       record: 'page'
      }
     }
    });
    brochure.stores.carouselData.read();
    });
     
    //The template
    tplSpreads = new Ext.Template(
    '<img src="{content}" />'
    )
     
    //The View
    brochure.views.FullSpreadView = Ext.extend(Ext.Carousel, {            
     layout: 'card',
     tpl: tplSpreads,
     
     initComponent: function() {
       brochure.views.FullSpreadView.superclass.initComponent.apply(this, arguments);        
     },
    })
    The problems I' cant work out are...

    Is stating the tpl: for the carousel enough to add the items: for the carousel?
    Should I be looping though the store in the Ext.Template?
    How do I upadate the brochure.views.FullSpreadView subclass? .update(storename) doesnt work.

    If I try to update the Carousel with the template like
    Code:
    brochure.views.FullSpreadView.update(brochure.stores.carouselData);
    I get an error
    Code:
    Uncaught TypeError: Object function (){ superclass.apply(this, arguments); } has no method 'update'
    I appreciate that all the answers are probably in the api docs which I have spent several days reading and researchng. But I've gotten into a loop myself and cant seem to see the wood from the trees as it were.

    Many thanks for any help in advanced.

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    392
    Vote Rating
    16
    digeridoopoo will become famous soon enough

      0  

    Default Old...

    Old...


    This question seems old...but as far as I know you can't have a tpl on a carousel. Did you have any progress on this? I have a working in-line store so hopefully I can just adapt that...

    :-)

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    i look for a solution to show images from store in carousel too ...
    do you have a solution please?

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    392
    Vote Rating
    16
    digeridoopoo will become famous soon enough

      0  

    Default A solution in the works...

    A solution in the works...


    I am working on a solution and have had some progress. My eventual aim is to have a Carousel that populates from the contents of a folder (a carousel that generates thumbnails automatically based on folder contents).

    I have successfully managed to get a carousel to populate automatically the names of subdirectories in a folder. It shouldn't be too hard to adapt it to display thumbnails instead but so far I haven't had much luck.

    I will post my progress so far soon.

    :-)

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    okey that sounds good.
    For the moment, i managed to find a solution with creating some views for each image and call each views in the carousel container. I send the image since my list store when there is an itemTap.

  6. #6
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    rec(name) si you path for your images ?
    you must display your image path in html image balise
    html: '<img src= ...

    If this method not work, it was like me, it's for this reason i displayed my images in a tpl, in each views ...
    A view per image...

  7. #7
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    392
    Vote Rating
    16
    digeridoopoo will become famous soon enough

      0  

    Default I've worked it out...

    I've worked it out...


    I've just worked it out! I've managed to get it to load images from a folder automatically and place them in a carousel. I had to delete the post but will re-write it with a different question / problem I have.

    :-)

  8. #8
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    yep

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. How to use "setActiveItem" on carousel in carousel
    By doggroup in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 8 Mar 2011, 10:43 PM
  3. !Question about Carousel in Carousel...
    By yCD in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 31 Jul 2010, 9:51 AM
  4. Carousel and Store
    By anthony-apd in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 24 Jul 2010, 2:34 PM
  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: 2

Tags for this Thread