View Full Version : "name" attribute on button

25 Apr 2012, 8:01 PM
Hello Everyone,
I have a button that I added a name attribute to. When I look in the chrome console I don't see the name attribute anywhere. I know for panels and containers that the name attribute sticks so to speak, so I was wondering why it would be different for a button.

Any explanation is greatly appreciated.

27 Apr 2012, 6:11 AM
Did you need access to the button? itemId: 'mybutton'

You can add any property to a class:
The difference is ... does it mean anything to that control. The API will provide a list of meaningful properties for that control.

var button = new Ext.Button({
text: 'load store',

name: 'myname',
hotdog: 'mustard',

renderTo: Ext.getBody()


>> hotdog: "mustard"
>> name: "myname"

Perhaps I have over simplified your question or did not understand.