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.

Hybrid View

  1. #1
    Sencha User
    Join Date
    May 2007
    Posts
    18
    Vote Rating
    0
    Graaf is on a distinguished road

      0  

    Default Grouped Nested List?

    Grouped Nested List?


    Is it possible to have a Grouped Nested List?
    Or have an 'grouped bar' between the toolbar and the nestedlist itself?

  2. #2
    Sencha User
    Join Date
    May 2007
    Posts
    18
    Vote Rating
    0
    Graaf is on a distinguished road

      0  

    Default


    Add a 'header' or 'title' in the NestedList. Show between the Toolbar and the List itself. To show the title in there and not in the toolbar.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    4
    Vote Rating
    0
    gmangrum is on a distinguished road

      0  

    Default here is a solution (not "the" solution, but it worked for me)

    here is a solution (not "the" solution, but it worked for me)


    I took the definition of getSubList from the codebase and copied it with some modifications. This worked for me to get grouped nested lists.

    getSubList: function (node) {
    var items = this.items,
    list,
    itemId = node.internalId;


    if (items && items.get) {
    list = items.get(itemId);
    }


    if (list) {
    /*NOTE: have a condition here because I only want the middle nested list to be grouped
    remove this if statement and use only the body if you want ALL nested lists to be grouped
    */
    if (typeof node.isRoot == 'undefined' && !node.childNodes[0].leaf) {
    //list.store.groupField = 'Text';
    list.store.getGroupString = function (record) {
    /*IMPORTANT!! depending on what your data type is, this line may need to be changed,
    but what you want is to return ONLY THE FIRST LETTER of your text
    */



    return record.data.Text[0];
    };
    list.grouped = true;
    list.indexBar = true;
    }
    return list;
    } else {
    var config = this.getListConfig(node);

    /*NOTE: have a condition here because I only want the middle nested list to be grouped
    remove this if statement and use only the body if you want ALL nested lists to be grouped
    */
    if (typeof node.isRoot == 'undefined' && !node.childNodes[0].leaf) {
    config.store.getGroupString = function (record) {
    /*IMPORTANT!! depending on what your data type is, this line may need to be changed,
    but what you want is to return ONLY THE FIRST LETTER of your text
    */

    return record.data.Text[0];
    };
    config.grouped = true;
    config.indexBar = true;
    }
    return config;
    }
    }

  4. #4
    Sencha User benwhite's Avatar
    Join Date
    Oct 2010
    Location
    Columbus, OH
    Posts
    49
    Vote Rating
    0
    benwhite is on a distinguished road

      0  

    Default


    Thanks, this was a great tip...
    I changed it just a bit so that it's more reusable.
    Here is my code.
    Code:
        getSubList: function (node) {
            var items  = this.items,
                list,
                itemId = node.internalId;
    
    
            // can be invoked prior to items being transformed into
            // a MixedCollection
            if (items && items.get) {
                list = items.get(itemId);
            }
    
    
            if (list) {
                //add support for grouping
                list.store.getGroupString = this.store.getGroupString;
                list.grouped = this.grouped;
                list.indexBar = this.indexBar;
                return list;
            } else {
                var config = this.getListConfig(node);
                //add support for grouping
                config.store.getGroupString = this.store.getGroupString;
                config.grouped = this.grouped;
                config.indexBar = this.indexBar;
                return config;
            }
        }
    This could be optimized a bit, but I wanted to keep the logic the same as the original code to make it easier for others to see what I changed.

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    16
    Vote Rating
    0
    dbwelch is on a distinguished road

      0  

    Default Can you post entire example?

    Can you post entire example?


    I'm trying to do the same with a nestedlist, but, don't see how this one function will help, is it possible for you post more of your example code and where the function fits in? Also, I'm using Sench 2.0, not sure if this still applies.

  6. #6
    Sencha User
    Join Date
    Jun 2011
    Posts
    2
    Vote Rating
    0
    falsanu is on a distinguished road

      0  

    Default Problem with changing internal.id

    Problem with changing internal.id


    Hi,

    i've tried your code and it works quite good, but there is a massive problem when using the Detail-Card. When i click on a leaf i'll get the wrong data for the Detail-Card.

    Do you have an idea where this fault happens? I assume that the error happens here:
    Code:
    itemId = node.internalId;
    Thanx for any help.

    falsanu.

Similar Threads

  1. How can you convert nested data to a grouped list?
    By djkraz in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 13 Jan 2011, 5:24 AM
  2. Grouped list header titles seem very dark
    By withanx in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 28 Dec 2010, 10:57 AM
  3. Replies: 0
    Last Post: 3 Dec 2010, 7:06 AM
  4. Change Headers on a grouped List?
    By ivanmayes in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 2 Nov 2010, 12:03 PM

Thread Participants: 5