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
    Join Date
    Aug 2010
    Posts
    24
    Vote Rating
    0
    olavevismaya is on a distinguished road

      0  

    Default loops in Extjs

    loops in Extjs


    hi......
    how to use loops in Extjs
    i want use loop to print 26 buttons for a to z in tbar
    if any one knows solution or ideas help me

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,619
    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


    Well, if you did it manually, you'd use:

    Code:
    var toolbar = new Ext.Toolbar({
        items: [{
            text: 'a'
        },{
            text: 'b'
        }, { // .......
            text: 'z'
        }]
    });
    So just write a loop to produce that same array!
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Aug 2010
    Posts
    24
    Vote Rating
    0
    olavevismaya is on a distinguished road

      0  

    Default


    how can i use loop here, can you explain

  4. #4
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    you can use character codes. A-Z 65-90, a-z 97-122. This is just a snippet from a plugin I had found on the site. Do a forum search for GridAZFilter

    Code:
    for (var i=65; i<91; i++) {
    				items.push({
    					text: String.fromCharCode(i),
    					enableToggle: true,
    					toggleGroup: 'AZfilter',
    					toggleHandler: this.buttonToggleHandler,
    					scope: this
    				});
    			}
    Marty

  5. #5
    Sencha User
    Join Date
    Nov 2012
    Posts
    3
    Vote Rating
    0
    toogii is on a distinguished road

      0  

    Default


    Can you explain it in details bit more? where shall i use this loop?

  6. #6
    Sencha User brittongr's Avatar
    Join Date
    Jun 2007
    Location
    Panama
    Posts
    109
    Vote Rating
    3
    brittongr is on a distinguished road

      0  

    Default


    You should add the code before the toolbar instance.
    Code:
    var yourItemsArray = [];
    
    //loop
    for(....)
    {....}
    
    var toolbar = new Ext.Toolbar({
           items: yourItemsArray
    });
    Greivin Britton

    My Extensions:
    Ext.ux.NumericField: Number field with support for currencySymbol, thousand separator, international...
    Ext.ux.PagerSizeSelector: A plugin that allows the change page size with just one click.
    Ext.ux.FieldAccess: A plugin to let the user know which fields are editable.

Similar Threads

  1. Passing arguments -- Refer Extjs In action book and ExtJs sample code
    By mrag74 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 28 Apr 2011, 2:11 PM
  2. [SOLVED] How to use for-loops in XTemplate
    By n3rd in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 20 May 2010, 5:07 AM
  3. Stop using for each loops
    By TheBuzzer in forum Community Discussion
    Replies: 1
    Last Post: 15 Dec 2009, 10:54 PM
  4. [UNKNOWN]Substitution of Ext.Each with loops
    By Animal in forum Ext 3.x: Bugs
    Replies: 5
    Last Post: 1 Nov 2009, 11:23 PM
  5. How to use two loops in MasterTemplate?
    By justmonkey in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 24 May 2007, 1:43 AM

Thread Participants: 4