Results 1 to 3 of 3

Thread: Event when binding is complete?

  1. #1
    Sencha Premium Member
    Join Date
    Sep 2011

    Question Event when binding is complete?

    I'm setting my ViewModel's data via setData. Inside my view properties like disabled, readOnly are bound to that ViewModel.

    No I want to focus on the first editable field inside that form. But this needs to be done AFTER the binding of the ViewModel with its View is done.

    Are there any events I can listen on? The documentation does not state anything that fits ...

  2. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Central Ohio



    There aren't any events you can listen to. However, on your component you can add an afterrender listener and then bind to your properties so that once it is available, you can focus on the first field.

    This assumes that both disabled and readOnly are available together (ie not asynchronously loaded). If the latter were the case, you could bind on both descriptors like so:

    panel.getViewModel().bind('{disabled}{readOnly}'), function () {...});
    Hope this helps,

  3. #3
    Sencha User razvanioan's Avatar
    Join Date
    Feb 2008


    This I've found myself the hard way (tried every possible listener on the panel), but what about viewModel's stores availability ?

    I couldn't find a valid panel listener where I could access viewModel's stores:

    1. if I try panel.getViewModel().getStore('storeName') - null is returned
    2. if I try panel.getViewModel().getStores() - null is returned
    3. if I try panel.lookupReference('myCombo').getStore() - an empty store is returned (useless here)
    Razvan Ioan ANASTASESCU
    Senior WEB Developer

Similar Threads

  1. [CLOSED] Event after two-way binding is complete
    By fei2012 in forum Ext 5: Bugs
    Replies: 4
    Last Post: 19 Dec 2014, 8:13 AM
  2. Event after two-way binding is complete
    By fei2012 in forum Ext 5: Q&A
    Replies: 3
    Last Post: 19 Dec 2014, 1:20 AM
  3. Replies: 4
    Last Post: 13 Dec 2013, 5:54 PM
  4. [CLOSED] What is a delegate Event Binding vs standard event binding?
    By jimibt in forum Sencha Architect 2.x: Bugs
    Replies: 2
    Last Post: 22 Oct 2012, 3:53 AM

Posting Permissions

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