1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    9
    Vote Rating
    0
    tldes is on a distinguished road

      0  

    Default Updating Title in Nested List on the leaf page

    Updating Title in Nested List on the leaf page


    I am having trouble figuring out what I need to do to get the title of the final destination page of a nested list to update. The title updates as it should throughout the list navigation but when you get to the destination page, it reverts back to the main page title. I am using Sencha 1.1.1 and have posted my store code and relevant page code below.

    You can view the test site at http://www.medcgroup.com/mea

    Nested List (maincard.js)

    Code:
    MeaMobile.views.Maincard = Ext.extend(Ext.NestedList, {
        fullscreen: true,
        title: "Home",
        iconCls: "home",
        updateTitleText: true,
        cardSwitchAnimation: 'slide',
      
        initComponent: function() {
            Ext.apply(this, {
                store: MeaMobile.menustore,
                getDetailCard: function(item, parent) {
                    var itemData = item.attributes.record.data;
                    return itemData.card;
                }   
            });
            MeaMobile.views.Maincard.superclass.initComponent.apply(this, arguments);
        }
    });
    Ext.reg('maincard', MeaMobile.views.Maincard);
    Main page (homecard.js)
    Code:
    MeaMobile.views.Homecard = Ext.extend(Ext.TabPanel, {
        title: "Welcome",
        iconCls: "home",
        
        initComponent: function() {
            Ext.apply(this, {
                defaults: {
                    styleHtmlContent: true
                },
                items: [
                { xtype: 'maincard' 
                },
                {
                    title: 'About',
                    scroll: 'vertical',
                    html: '<p>McDonald Eye Information here.</p>'
                }]
            });
            MeaMobile.views.Homecard.superclass.initComponent.apply(this, arguments);
        }
    });
    
    
    Ext.reg('homecard', MeaMobile.views.Homecard);
    Data (menustore.js)

    Code:
    MeaMobile.menustore = new Ext.data.TreeStore({
        model: 'ListItem',
        root: {
            items: [{
                text: 'Doctors',
                    items: [
                    {
                        text: 'Chad Betts, M.D., R.Ph.',
                        card: {xtype: 'bettscard'},
                        leaf: true
                    },
                    {
                        text: 'Brad Talley, M.D.',
                        card: {xtype: 'talleycard'},
                        leaf: true
                    },
                    {
                        text: 'Jay McDonald II, M.D.',
                        card: {xtype: 'mcdonaldcard'},
                        leaf: true
                    },
                    {
                        text: 'Dusty McIver, O.D.',
                        card: {xtype: 'mcivercard'},
                        leaf: true
                    },
                    {
                        text: 'Vivi Fretland, O.D.',
                        card: {xtype: 'fretlandcard'},
                        leaf: true
                    }
                    ]
            }, //end doctors
            {
                text: 'Vision Services',
                items: [
                    {
                        text: 'Optical',
                        card: {xtype: 'opticalcard'},
                        leaf: true
                    },
                    {
                        text: 'Glaucoma',
                        card: {xtype: 'glaucomacard'},
                        leaf: true
                    },
                    {
                        text: 'Dry Eye',
                        card: {xtype: 'dryeyecard'},
                        leaf: true
                    }
                    ]
            }, // end vision services
                    {
                text: 'LASIK',
                items: [
                    {
                        text: 'LASIK Information',
                        card: {xtype: 'lasikcard'},
                        leaf: true
                    },
                    {
                        text: 'Screening',
                        card: {xtype: 'lasikscreeningcard'},
                        leaf: true
                    },
                    {
                        text: 'The Prodedure',
                        card: {xtype: 'lasikprocedurecard'},
                        leaf: true
                    },
                    {
                        text: 'FAQ',
                        card: {xtype: 'lasikfaqcard'},
                        leaf: true
                    },
                    {
                        text: 'Testimonials',
                        card: {xtype: 'lasiktestimonialcard'},
                        leaf: true
                    }
                    ]
            }, // end LASIK
                       {
                text: 'Cataracts',
                items: [
                    {
                        text: 'Cataract Information',
                        card: {xtype: 'cataractcard'},
                        leaf: true
                    },
                    {
                        text: 'Cataract Surgery',
                        card: {xtype: 'cataractsurgerycard'},
                        leaf: true
                    },
                    {
                        text: 'Premium Lenses',
                        card: {xtype: 'premlenscard'},
                        leaf: true
                    },
                    {
                        text: 'FAQ',
                        card: {xtype: 'cataractfaqcard'},
                        leaf: true
                    },
                    {
                        text: 'Testimonials',
                        card: {xtype: 'cataracttestimonialscard'},
                        leaf: true
                    }
                    ]
            }, // end Cataracts
                          {
                text: 'Location',
                items: [
                    {
                        text: 'Location',
                        card: {xtype: 'locationcard'},
                        leaf: true
                    }
                    ]
            }, // end location
                            {
                text: 'Contact',
                items: [
                    {
                        text: 'Contact Us',
                        card: {xtype: 'contactcard'},
                        leaf: true
                    }
                    ]
            } // end contact
            ], 
        },// end menu items
        proxy: {
            type: 'ajax',
            reader: {
                type: 'tree',
                root: 'items'
            }
        }
    });
    Sample leaf card (First doctor in list)

    Code:
    MeaMobile.views.Bettscard = Ext.extend(Ext.Panel, {
        id: 'bettscard',
        title: 'Dr. Betts',
        styleHtmlContent: true,
        html: 'Doctor Information here!'
    });
    Ext.reg('bettscard', MeaMobile.views.Bettscard);

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is based on the detail card
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    9
    Vote Rating
    0
    tldes is on a distinguished road

      0  

    Default


    Yes, I am basically using the nested list as my app navigation with the detail cards being the individual pages.

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Posts
    51
    Vote Rating
    0
    noromamai is on a distinguished road

      0  

    Arrow


    you can set the title using

    Code:
    this.title = 'whatever-you-want-your-title-to-be';
    if you render something custom for your detail card just add that into the

    Code:
     getDetailCard: function(item, parent) {}
    of your nestedlist. i used it to set the title to nothing in my app.

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    1
    Vote Rating
    0
    sanket_mehta75 is on a distinguished road

      0  

    Default Nested list

    Nested list


    Hey,
    Can any one tell me.....how to create nested list in sencha touch2,i been through with all examples but i am not getting,i follow kitchen sink example but i got confuse in it procedure,i took reference of it it....but not happening,i am creating one app,i want nested list in bottom tab,when client tab a bottom tab then it will display a list and clicking on one panel it shows different option in nested form....
    pls reply as soon as possible.

    thanx

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi