]> git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/components/ViewSelection.js
8f81f0a766f0bfc14347c3dd85bb51d171d2aca4
[gpl/argeo-slc.git] / org.argeo.slc.webapp / src / main / webapp / source / class / org / argeo / ria / components / ViewSelection.js
1 qx.Class.define("org.argeo.ria.components.ViewSelection",
2 {
3 extend : qx.core.Object,
4
5 construct : function(viewId){
6 this.base(arguments);
7 this.nodes = [];
8 this.setViewId(viewId);
9 },
10
11 properties : {
12 viewId : {
13 check : "String",
14 nullable: false
15 }
16 },
17
18 events : {
19 "changeSelection" : "qx.event.type.Data"
20 },
21
22 /*
23 *****************************************************************************
24 MEMBERS
25 *****************************************************************************
26 */
27
28 members :
29 {
30 clear : function(){
31 this.nodes = [];
32 this.triggerEvent();
33 },
34
35 addNode : function(node) {
36 this.nodes.push(node);
37 this.triggerEvent();
38 },
39
40 getCount : function() {
41 return this.nodes.length;
42 },
43
44 getNodes : function(){
45 return this.nodes;
46 },
47
48 triggerEvent : function(){
49 this.fireDataEvent("changeSelection", this);
50 }
51
52 }
53 });