Results 1 to 2 of 2

Thread: Can you find a Component by name?

  1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    72
    Vote Rating
    1
      0  

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •