Roo.util.Observable
Roo.View 

		   

Class Roo.View

Package:Roo
Defined In: Roo/View.js.
Class:View
Subclasses: Roo.JsonView
Extends: Roo.util.Observable
Create a "View" for an element based on a data model or UpdateManager and the supplied DomHelper template.
This class also supports single and multi selection modes.

Create a data model bound view:

var store = new Roo.data.Store(...);

var view = new Roo.View({
el : "my-element",
tpl : '<div id="{0}">{2} - {1}</div>', // auto create template

singleSelect: true,
selectedClass: "ydataview-selected",
store: store
});

// listen for node click?
view.on("click", function(vw, index, node, e){
alert('Node "' + node.id + '" at index: ' + index + " was clicked.");
});

// load XML data
dataModel.load("foobar.xml");

For an example of creating a JSON/UpdateManager view, see {link Roo.JsonView}.



Note: The root of your template must be a single node. Table/row implementations may work but are not supported due to
IE"s limited insertion support with tables and Opera"s faulty event bubbling.


Note: old style constructor is still suported (container, template, config)
Class Comments / Notes => [Add Your comment/notes about this class]
Config Options (Usually are also Properties)
Options Defined By
Public Properties - Has None
Public Methods
Method Defined By
Events
Event Defined By
Documentation generated by Introspection Doc Generator on Fri Jul 13 2018 14:10:53 GMT+0800 (HKT) Based on JsDoc Toolkit