1. #1
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default DataView Events Not Firing

    DataView Events Not Firing


    I have a scenario in which I retrieve a collection of data from the server, process the results, and then create a tabbed panel, each tab of which contains a dataview bound to a custom collection of data that I produce within my preprocessing.

    Code:
    // loop over custom tabCollection data
    Ext.Object.each( tabCollection, function( key, value, object ) {
        panel.add({
            // add the data view
    	xtype: 'detail.consultation.detail',
    	data: value,
    	title: key
        });
    });
    panel.setActiveTab( 0 );
    For whatever reason, however, none of the dataview's events seem to fire. I've even tried adding the listener directly to the view, but even then the events don't fire. Anybody have any ideas on this?

    Thanks

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,997
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    The code you posted doesn't really tell us much. What is "detail.consultation.detail"? What does it do? Where are you binding any events for it?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    Quote Originally Posted by evant View Post
    The code you posted doesn't really tell us much. What is "detail.consultation.detail"? What does it do? Where are you binding any events for it?
    You are right--my apologies for the lack of detail.

    The item I'm adding to the tab panel is a dataview...one for each item in the loop I'm creating.

    My intention is to handle the events from my controller in the normal componentquery style of ExtJS MVC-ness.

    When I use static dataviews elsewhere within my app, I'm able to handle their events via the controller just fine. However, when I add the dataviews dynamically, it does not appear that any of their events are firing. I've tried tweaking the component query in the controller, as well hard-coding the listeners on the components themselves...no dice either way.

    Any ideas?
    Thanks!

  4. #4
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    85
    existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice existdissolve is just really nice

      0  

    Default


    Ok, nevermind on this. I had not configured my view correctly, so that's why the events were not firing. Once I fixed the configuration, the events fire correctly, even when the dataviews are added dynamically.

    Thanks

Thread Participants: 1