1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    19
    Vote Rating
    1
    Shadin_a is on a distinguished road

      0  

    Default How to create a subclass for render - send a parameter ?

    How to create a subclass for render - send a parameter ?


    I have a checkitem menu and I want to add icons to each menu item, so I inserted each icon after the menu item is rendered.

    peace of my code:


    Code:
    {   xtype: 'menucheckitem',
         text: 'First Arrow'
         listeners: {
               render: {
                     fn: me.onMenucheckitemRender,
                     scope: me
                            }
                         }
    }
    Code:
    onMenucheckitemRender: function (abstractcomponent, options)
    {
    Ext.DomHelper.insertAfter(abstractcomponent.getEl().down(".x-menu-item-icon"), {
        tag: 'img', 
        src: "icons/arrow1.png"
    });
    }
    This works just fine, but since I will need it many times with different icons, I would like to know how to create a subclass so I can reuse this functionality.

    Thank you

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,337
    Vote Rating
    130
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

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..." hd porno faketaxi