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
    Ext User El Turcky's Avatar
    Join Date
    Aug 2010
    Location
    Gradisca d'Isonzo (ITALY)
    Posts
    2
    Vote Rating
    0
    El Turcky is on a distinguished road

      0  

    Default Add event in item list

    Add event in item list


    Hi, I'm new here. I've got some problems with a list. I read that nested list can't join with stores. So I made this code with a simple list:
    Code:
    Ext.setup({
    	
        icon: THECA_WEB + 'images/xxx.png',
        tabletStartupScreen: THECA_WEB + 'images/tablet_startup.png',
        phoneStartupScreen: THECA_WEB + 'images/phone_startup.png',
        glossOnIcon: false,
    
        onReady: function() {
    
    		Ext.regModel('Page', {
    		    fields: ['id', 'title']
    		});
    
    		var s = new Ext.data.JsonStore({
    		    autoLoad: true,
    		    model: 'Page',
    		    proxy: {
    		        type: 'ajax',
    		        url: 'http://localhost/touch_test/test/getpagine/',
    		        reader: {
    		            type: 'json',
    		            root: 'pagine'
    		        }
    		    }
    		});
    			
    		var list = new Ext.List({
                fullscreen: true,
                tpl: '<tpl for="."><div class="x">{title}</div></tpl>',
                itemSelector: '.x',
                store: s
            });
    	}
    });
    The list work correctly!! When I click an item of the list I want to enter into another page that shows me a list of details that arrives me from the array. (for example with nested list, with that I can make it manually) How can I make it dynamically?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,631
    Vote Rating
    581
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    On your list, add an itemtap listener:

    Code:
    list.on('itemtap', function(list, index, item, e){
        var rec = list.store.getAt(index);
        console.log(rec.get('title'));
        // do something here
    });
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User El Turcky's Avatar
    Join Date
    Aug 2010
    Location
    Gradisca d'Isonzo (ITALY)
    Posts
    2
    Vote Rating
    0
    El Turcky is on a distinguished road

      0  

    Default


    Perfect, thank you.

    Now I need to show an edit form on the itemtap event you just suggested me.

    Which is the best way to achieve this?

    I mean, i know how to connect to server logic with stores and models,
    but i cannot figure out how to link different "views" to different events..

    thanks for your help
    Nicola

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,631
    Vote Rating
    581
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Similar Threads

  1. Add components to list item instead of template html
    By meyerovb in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 10 Aug 2010, 3:56 PM
  2. sample code to wire ontap event to a template list item?
    By profunctional in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 7 Jul 2010, 11:17 AM
  3. Dynamically add an item to a list
    By meyerovb in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 1 Jul 2010, 11:33 AM
  4. add item not in combobox list
    By iceblast_01 in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 4 Dec 2008, 8:21 PM

Thread Participants: 1