View Full Version : Ext.ux.DataView

2 Jan 2008, 12:32 AM
Just noticed that the DataView is in need of an additional listener, the "refresh" listener. I am using the dataview to load photos and then using the SlimBlox lightbox (http://www.digitalia.be/software/slimbox) to load each photo. The problem I ran into was that there was not an event to fire once the ExtJS script loaded the template. This little extension simply adds that one line of code to fire the "refresh" event. This event gets fired after data is loaded into the dataview.

3 Jan 2008, 7:02 PM
nice work!

9 Jan 2008, 12:27 PM
This can be simplified even more, and actaully protected against future changes to the internal DataView refresh method:

Ext.ux.DataView = function(config) {
Ext.ux.DataView.superclass.constructor.call(this, config);

Ext.extend(Ext.ux.DataView, Ext.DataView, {
refresh : function(){
this.fireEvent("refresh", this);

Ext.reg('uxdataview', Ext.ux.DataView);

I think the thought is that you would watch the store itself to monitor data changes and not the dataview UI component, but I can see a couple cases where you might want that event.