]>
git.argeo.org Git - gpl/argeo-slc.git/blob - components/ViewSelection.js
2 * Generic selection model associated to an IView content opened in a given ViewPane.
3 * It contains in an array any row/data/node, and triggers changeSelection data events.
4 * @author Charles du Jeu
6 qx
.Class
.define("org.argeo.ria.components.ViewSelection",
8 extend
: qx
.core
.Object
,
11 * @param viewId {String} The ViewPane unique id
13 construct : function(viewId
){
16 this.setViewId(viewId
);
21 * The viewPane unique id
31 * Triggered each time the selection changes.
33 "changeSelection" : "qx.event.type.Data"
37 *****************************************************************************
39 *****************************************************************************
53 * Add a row or xml node or whatever
54 * @param node {mixed} Data to add to the selection
56 addNode : function(node
) {
57 this.nodes
.push(node
);
62 * The number of rows/nodes selected
65 getCount : function() {
66 return this.nodes
.length
;
70 * Returns the content of the selection
73 getNodes : function(){
78 * Creates and fire a data event changeSelection
80 triggerEvent : function(){
81 this.fireDataEvent("changeSelection", this);