1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    39
    Answers
    5
    Vote Rating
    0
    Araberen is on a distinguished road

      0  

    Default Unanswered: Traversing a form / Ext.Element to its real Ext type

    Unanswered: Traversing a form / Ext.Element to its real Ext type


    Hi,

    I'm simply trying to get the text of the last text input of my form.
    Till now, I'm using select:

    myFormVar.select('input[type=text]').last();

    But it gives me an Ext.Element. I would like to get the Ext.form.field.Text to use its properties...

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,604
    Answers
    543
    Vote Rating
    325
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    In general you can't go from an element back to the component. In a specific case you can usually work it out, for example by reading off a matching id, but it's not usually a good idea. One case where it can be needed is for event listeners on elements with delegation.

    You probably just want to use a component query instead of resorting to selector queries.

Thread Participants: 1