1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Kiev, Ukraine
    Posts
    9
    Answers
    2
    Vote Rating
    1
    tracker2k is on a distinguished road

      0  

    Default Answered: Make some items of Nestedlist unclickable

    Answered: Make some items of Nestedlist unclickable


    I have a nestedlist filled with items. I want to make some of the items unclickable. Is there a variable to unset or some kind of flag I can use?

    UPDATE. Under items I mean the data loaded from Store object.
    Last edited by tracker2k; 29 Nov 2012 at 3:26 AM. Reason: update

  2. I have found another solution. I have just override basic function onItemTap of my nestedlist and base my function on code from basic function. Than I have implemented some needed logic and that's it.
    Code:
    onItemTap: function(list, index, target, record, e) {
         var me = this,
         store = list.getStore(),
         node = store.getAt(index);
          var is_separator = record.get('separator');
          me.fireEvent('itemtap', this, list, index, target, record, e);
         if (node.isLeaf()) {
             if (! is_separator) {
                 me.fireEvent('leafitemtap', this, list, index, target, record, e);
                 me.goToLeaf(node);
             }
         } else {
             if (! is_separator) {
                 this.goToNode(node);
             }
         }
     }

  3. #2
    Sencha User
    Join Date
    Nov 2011
    Location
    England
    Posts
    135
    Answers
    11
    Vote Rating
    7
    george.m is on a distinguished road

      1  

    Default


    What sort of items? Off the top of my head, you could query the components and then apply .setDisabled(true) on them.

  4. #3
    Sencha User
    Join Date
    Oct 2012
    Location
    Kiev, Ukraine
    Posts
    9
    Answers
    2
    Vote Rating
    1
    tracker2k is on a distinguished road

      0  

    Default


    Quote Originally Posted by george.m View Post
    What sort of items? Off the top of my head, you could query the components and then apply .setDisabled(true) on them.
    I was talking about data loaded from Store object.

  5. #4
    Sencha User
    Join Date
    Nov 2011
    Location
    England
    Posts
    135
    Answers
    11
    Vote Rating
    7
    george.m is on a distinguished road

      1  

    Default


    I'm not sure if it is possible to do it via a tpl applied in the list. But you could run some code after loading the list which searches your store for the indexes of the records that need to be disabled, then using that index, access that item within the list component to apply the .setDisabled(true)

  6. #5
    Sencha User
    Join Date
    Oct 2012
    Location
    Kiev, Ukraine
    Posts
    9
    Answers
    2
    Vote Rating
    1
    tracker2k is on a distinguished road

      0  

    Default


    I have found another solution. I have just override basic function onItemTap of my nestedlist and base my function on code from basic function. Than I have implemented some needed logic and that's it.
    Code:
    onItemTap: function(list, index, target, record, e) {
         var me = this,
         store = list.getStore(),
         node = store.getAt(index);
          var is_separator = record.get('separator');
          me.fireEvent('itemtap', this, list, index, target, record, e);
         if (node.isLeaf()) {
             if (! is_separator) {
                 me.fireEvent('leafitemtap', this, list, index, target, record, e);
                 me.goToLeaf(node);
             }
         } else {
             if (! is_separator) {
                 this.goToNode(node);
             }
         }
     }

Thread Participants: 1

Tags for this Thread

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..."