inane
inane

Reputation: 648

Dynamically ItemId in Sencha Touch app

I am working in an app based in Sencha Touch 2, and I have different buttons with the possibility of different badge text. My current code in the view is:

items: [
            {
                xtype: 'button',
                text: xx.Text.getText('SC_I_CONDITIONS_BTN'),
                itemId: 'setItemConditions',
                cls:'setConditions'
            }
        ],

My question is, how can I specify different badge texts? Each one has different total, in my app you can generate different buttons dinamically with the same itemID

Thanks a lot!!

Upvotes: 2

Views: 107

Answers (1)

RaviPatidar
RaviPatidar

Reputation: 1486

I think you want to set badge text dynamically first get button in controller like that

Ext.getCmp("setItemConditions").setBadgeText('newBadgeText');

Upvotes: 1

Related Questions