Ext.define("Ext.ux.icon.view.Panel", {
	extend: "Ext.form.Panel",
	alias: "widget.ux.icon.view.panel",

	config: {
		dataView: null,
		actionFn: Ext.emptyFn
	},

	layout: "fit",

	initComponent: function () {

		var i_self = this;
		var i_dataview = i_self.createDataView();

		i_self.callParent();
		i_self.add(i_dataview);
		i_self.addDocked(i_dataview.createTopBars());
		return i_self;
	},

	createDataView: function() {

		var i_self = this;
		var i_dataview = Ext.widget("ux.icon.view.dataview", {
			actionFn: i_self.getActionFn()
		});
		i_self.setDataView(i_dataview);
		return i_dataview;
	}
});
