1. #11
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    Quote Originally Posted by stevwinata View Post
    Code:
    onGuestListSearch: function(element, e) {
            // do the search here - f.e. an AJAX call to your server, etc.
            var searchPattern =  this.getGuestListSearchField().getValue();
    }
    above code show me how to get value from a component. that's right? i tried on a textfield (any textfield in view) and give me error "cannot found method". if it can, how doing it right in your pattern?
    the method getGuestListSearchField() is created by Touch based on the ref(erence) "guestListSearchField" at the start of the controller (in the refs section).

    When you need to access other fields you will have to write a reference to that field. F.e. if you have a textfield in your form that has the property name: 'guestName' then you could write:
    Code:
    refs: {
        ...
        guestListSearchField: 'guestlist searchfield',
        guestFormGuestNameField: 'guestform textfield[name=guestName]',
        ...
    },
    This will let Touch to create a getter (and a setter) for you. So when you need to access the field you could write
    Code:
    var name = this.getGuestFormGuestNameField().getValue();
    This is ok to access single fields. But when it is about to access a whole form you better use something like this
    Code:
    var formValues = this.getGuestForm().getValues();
    This will retrieve all NAMED field values (=fields that have the attribute NAME set).

  2. #12
    Sencha User
    Join Date
    Mar 2014
    Posts
    1
    Vote Rating
    0
    cosmos93 is on a distinguished road

      0  

    Default


    Thank you For sharing....

  3. #13
    Sencha User
    Join Date
    Apr 2014
    Posts
    1
    Vote Rating
    1
    dconde is on a distinguished road

      1  

    Default


    The updated example can be found at https://dl.dropboxusercontent.com/u/...2013-11-04.zip. The original post has the name of the new version but links to the old version.

  4. #14
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    Quote Originally Posted by dconde View Post
    The updated example can be found at https://dl.dropboxusercontent.com/u/...2013-11-04.zip. The original post has the name of the new version but links to the old version.
    fixed! thanks for bringing this up!!