1. #1
    Sencha Premium Member
    Join Date
    Aug 2011
    Posts
    168
    Answers
    1
    Vote Rating
    2
    GertBoers is on a distinguished road

      0  

    Default Answered: NestedList change toolbartitle of detailcard

    Answered: NestedList change toolbartitle of detailcard


    Hey,

    I created a nestedList using the example code...
    It looks fine, I only want to change one thing: when I get to the detailcard, the title of the toolbar changes back to the very first one (in the example it changes back to 'music'), but instead I want it to change to the text of the last tapped item.

    To clarify:

    if this is the nested list:

    Music -> Artists -> Artist 1, Artist 2, ...

    when artist 2 is tapped, the detailcard appears with 'music' in the toolbar, instead i want it to say 'artist 2'.

    Here's my getDetailCard code:

    Code:
        	
               getDetailCard: function(item, parent) {				
                   var itemData = item.attributes.record.data,
                   parentData = parent.attributes.record.data,
                   detailCard = new Ext.Panel({
                       scroll: 'vertical',
                       styleHtmlContent: true,
                       tpl: ["<div>{content}</div>","<div class='centre'><img src='{fronturl}' class='{detailcls}'/></div>"]
                   });
                   detailCard.update(itemData);
                   this.backButton.setText(parentData.text);
                   return detailCard;
               },

    Thanks!

  2. You can do:

    Code:
                   this.backButton.setText(parentData.text);
               this.title = itemData.text;
                   return detailCard;

  3. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    43
    Answers
    4
    Vote Rating
    0
    bassjobsen is on a distinguished road

      0  

    Default


    You can do:

    Code:
                   this.backButton.setText(parentData.text);
               this.title = itemData.text;
                   return detailCard;

  4. #3
    Touch Premium Member
    Join Date
    Dec 2011
    Posts
    13
    Vote Rating
    0
    NJS is on a distinguished road

      0  

    Default


    This solution still has problems unfortunately...

    ...it does change the title of the toolbar on the detailcard...
    HOWEVER, as you tap back to the root of the list, the title bar will update as usual to reflect the current list category, UNTIL it reaches the root, where the title will bizarrely revert back to the title of the detailcard, instead of, say MUSIC (as in this case).

    I've noticed that Sencha Touch 2 NestedList seems to work ok in the demo - the detailcard does reflect the relevant title.

    So:
    - is there a solution for ST1?
    - or should I work with ST2? Maybe too early for ST2?

    Any legends who can advise?
    Thank you!

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar