Results 1 to 3 of 3

Thread: Modern dataview list on load listerner not triggering

  1. #1
    Sencha User
    Join Date
    May 2017
    Posts
    27

    Default Modern dataview list on load listerner not triggering

    Hello,
    I have a List object with a viewmodel/controller and an ajax proxy loading data. I try to automatically select a row on certain conditions (e.g. last opened or first). With ext5 I had no problems of impelemting a load listener to the store but it just seems not to trigger at all no matter where I add the listener to.

    What did I try which didn't work?
    - Adding the listener to the store itself
    - Adding it to the controller
    - Adding it to the ViewModel
    - Adding it to the initialize function of the view
    - Adding it to the afterRender function of the view

    What did work?
    - Adding a defer function to the initialize of the view. I don't want this dirty solution as this should easily work with the load listener or another listener



    So I'd like to know what's wrong with my approaches?
    Why do all those load listeners not work?
    And how to properly select a list item/Where to hook into?

    Greetings

  2. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258
    Answers
    759

    Default

    listerners

  3. #3
    Sencha User
    Join Date
    May 2017
    Posts
    27

    Default

    Quote Originally Posted by evant View Post
    listerners
    updated the fiddle, stupid typo, sorry, but it doesn't change the outcome.

    E:
    If I overwrite the load function of the store and fire an event called load, all the listeners seem to work.
    PHP Code:
    ,    load:function() {        // If I add this, the listeners are all working        this.callParent(arguments);        this.fireEvent('load');    } 
    Is this a bug? Those listeners should work automatically, shouldn't they?

    Also I noticed that relayevents isn't working anymore in the modern view.
    PHP Code:
    this.relayEvents(this.getStore(), ['load']); 
    This was called in the initComponent which is now initialize. But the store is never present at the time the component is initialized.

Similar Threads

  1. Replies: 1
    Last Post: 1 Jun 2016, 3:50 PM
  2. [FIXED] ExtJS 6.0.0 modern dataview/list/grid doesn't refresh on store clear
    By themightychris in forum Ext JS 6.x Bugs
    Replies: 2
    Last Post: 30 Sep 2015, 4:35 PM
  3. [Modern] Ext.dataview.List -> onItemDisclosure
    By tobiu in forum Ext JS 6.x Bugs
    Replies: 1
    Last Post: 14 Sep 2015, 10:24 AM
  4. [FIXED] Modern - Ext.dataview.List assumes store is set in onContainerResize
    By FBNitro in forum Ext JS 6.x Bugs
    Replies: 2
    Last Post: 25 Aug 2015, 3:38 PM
  5. Replies: 4
    Last Post: 25 Oct 2011, 11:28 PM

Posting Permissions

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