1. #1
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    72
    Vote Rating
    1
    UGA_Zimma is on a distinguished road

      0  

    Post Can you find a Component by name?

    Can you find a Component by name?


    I was curious if you could find a Component by name not id?

    Field:
    Code:
    xtype:'textfield',
    name:'testName',
    id:'testId
    This works great:
    Code:
    Ext.getCmp('testId')
    I would like something for name:
    Code:
    Ext.getCmp('testName')
    But this doesnt work.

    Any thoughts?

    Thanks,
    UGA_Zimma

  2. #2
    Sencha User
    Join Date
    Sep 2009
    Location
    Calgary, Alberta, Canada
    Posts
    638
    Vote Rating
    2
    CrazyEnigma is on a distinguished road

      1  

    Thumbs up


    You can.

    Because when you set up your configuration, you can set any property. Refer to the API on this.
    Code:
         obj.find("name","testName");
    You could also use itemId instead of id.

Thread Participants: 1