Results 1 to 6 of 6

Thread: [CLOSED] [B3] Bound components bound to stores should relay beforeload, load events

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045

    Default [CLOSED] [B3] Bound components bound to stores should relay beforeload, load events

    Not much to say, really - you're already relaying scroller and view events, why not the store as well?

    stevil

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    Don't want to bloat the framework with unneeded things. Why not just add listener to the Store since you have to create that outside the Grid whereas the View gets created by the Grid.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045

    Default

    If you look at Ext.table.Panel, you'll notice that a store is required for it and its descendants. From TableGrid's initComponent:

    PHP Code:
    if (!this.store) {
        
    Ext.Error.raise("You must specify a store config");

    If the object is central to the function of the panel (like a view or a scroller), I think it's a stretch to call it "bloat[ing] the framework with unneeded events" to relay an event for a required object, just because the grid didn't create it.

    Please note that my post was not titled, "Components should relay all child events", because I don't believe that to be true.

    Also, what if I have a store that outlives the life of the panel, and gets reused by it (or others with compatible data models)? The store would then get created ahead of time, and would be referenced in the grid panel config, not config'd with listeners. At that point, I'm manually setting up the store event AFTER I instantiate the grid, which is messy. It would be far cleaner for the grid panel to wire itself up to relay the store's load events and clean up after them itself.

    stevil

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449

    Default

    I doubt a good number of people would need it. If you need it then when you extend the component, fire the event you want and then call it's superclass function.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  5. #5
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045

    Default

    Perhaps we'll need to agree to disagree on this - I just think that a grid knowing when a critical required component is about to do something, or just completed it, that's a grid level event - just like scroll events - I don't need them at all for my app - never have, but I don't dispute that others would...

    cheers,

    stevil

  6. #6
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    We won't be relaying store events on the grid.
    Aaron Conran
    @aconran

Similar Threads

  1. Can a store find the components bound to it?
    By Iteron in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 15 Jan 2011, 5:37 AM
  2. Store object find components bound to it
    By Iteron in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 14 Jan 2011, 3:57 PM
  3. How to implement Events which are not bound to Elements
    By BorisNikolaevich in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 15 Jun 2009, 5:05 AM
  4. Store.load() bound to EditorGrid doesn't refresh
    By andrewjbaker in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 16 Apr 2008, 1:44 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
  •