1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    45
    Vote Rating
    0
    wakatanka is on a distinguished road

      0  

    Question x-item-selected class on list doen't work

    x-item-selected class on list doen't work


    hi, i've a button that launch this function:

    PHP Code:
    bigprice = function(pic) {
        if (!
    this.popup2) {
            
    this.popup2 = new Ext.Panel({
                
    id'bigpanel2',
                
    floatingtrue,
                
    modaltrue,
                
    centeredtrue,
                
    width600,
                
    height700,
                
    styleHtmlContenttrue,
                
    dock'bottom',
                
    scroll'vertical',
                
    items: [{
                    
    xtype'list',
                    
    tpl: [
                    
    '<tpl for="."><div class="linea">{text}</div></tpl>',
                    ],
                    
    itemSelector'div.linea',
                    
    singleSelecttrue,
                    
    width550,
                    
    height456,
                    
    indexBartrue,
                    
    //selectedCls: 'newclass',
                  
    listeners: {
                        
    //   itemtap: lineaselezionata,
                        
    beforerender: function() {
                            
    popola2(pic);
                        }, 
                    },
                }],
                
    dockedItems: [{
                    
    dock'bottom',
                    
    xtype'toolbar',
                    
    items: [{
                        
    text'annulla'
                    
    },
                    {
                        
    xtype'spacer'
                    
    },
                    {
                        
    text'acquista'
                    
    }]
                }]
            });
        }
        
    this.popup2.show();
    }; 
    it makes appear a panel with a list inside, populed by an ajax request (popola2).
    It work all fine, but when i click on an element of the list, it doesn't get the x-item-selected class, but only the
    "pressed".

    help...

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Posts
    45
    Vote Rating
    0
    wakatanka is on a distinguished road

      0  

    Default


    No one can help me?

    i can find any option in list documentation for selected item class, it seems that is "automatic"

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2010
    Posts
    33
    Vote Rating
    33
    taylon has a spectacular aura about taylon has a spectacular aura about

      0  

    Default


    Not sure if this is what you want but take a look at Evant's example of getting a handle on the selected item.

    http://www.sencha.com/forum/showthre...-list-of-items

  4. #4
    Sencha Premium Member
    Join Date
    Aug 2010
    Location
    Norderstedt, Germany
    Posts
    29
    Vote Rating
    0
    SvenWS is on a distinguished road

      0  

    Default


    You have to setup your own css classes. Just copy the original classes to your css file and if you want rename it to 'my-x-item-selected' and 'my-x-item-pressed' and set selectedCls and pressedCls to these classnames.

    See also http://www.sencha.com/forum/showthread.php?108581

Similar Threads

  1. Replies: 5
    Last Post: 26 Jun 2009, 2:42 AM
  2. Replies: 3
    Last Post: 16 Feb 2009, 4:44 AM
  3. DOM Refreshing - doen't work in IE
    By elnove in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 13 Feb 2009, 9:14 AM
  4. Replies: 1
    Last Post: 24 Sep 2008, 8:07 AM
  5. Simple Window+accordion doen't work with Internet Explorer 6
    By caam in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 5 Mar 2008, 3:14 AM

Thread Participants: 2

Tags for this Thread