]> git.argeo.org Git - gpl/argeo-slc.git/blob - server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/monitor/PropertiesView.js
git-svn-id: https://svn.argeo.org/slc/trunk@2661 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc
[gpl/argeo-slc.git] / server / org.argeo.slc.ria / src / argeo-ria-lib / slc / class / org / argeo / slc / ria / monitor / PropertiesView.js
1 qx.Class.define("org.argeo.slc.ria.monitor.PropertiesView", {
2 extend : qx.ui.container.Composite,
3 implement : [org.argeo.ria.components.IView],
4
5 properties : {
6 /**
7 * The commands definition Map that will be automatically added and wired to the menubar and toolbar.
8 * See {@link org.argeo.ria.event.CommandsManager#definitions} for the keys to use for defining commands.
9 */
10 commands : {
11 init : {}
12 },
13 viewSelection : {
14 nullable:false,
15 check:"org.argeo.ria.components.ViewSelection"
16 },
17 view : {
18 init : null
19 },
20 instanceId : {init:""},
21 instanceLabel : {init:""}
22 },
23
24 construct : function(){
25 this.base(arguments);
26 this.setLayout(new qx.ui.layout.Dock());
27 },
28
29 members : {
30 /**
31 * The implementation should contain the GUI initialisation.
32 * This is the role of the manager to actually add the graphical component to the pane,
33 * so it's not necessary to do it here.
34 * @param viewPane {org.argeo.ria.components.ViewPane} The pane manager
35 * @param data {Mixed} Any object or data passed by the initiator of the view
36 * @return {Boolean}
37 */
38 init : function(viewPane, data){
39 this.setView(viewPane);
40 this.setViewSelection(new org.argeo.ria.components.ViewSelection(viewPane.getViewId()));
41 this.label = new qx.ui.basic.Label("Properties");
42 this.add(this.label, {edge : "center"});
43 },
44 /**
45 * The implementation should contain the real data loading (i.o. query...)
46 * @return {Boolean}
47 */
48 load : function(){
49
50 },
51
52 updateData : function(node){
53 this.label.setContent("Properties for : " + node.getLabel());
54 },
55 /**
56 * Whether this component is already contained in a scroller (return false) or not (return true).
57 * @return {Boolean}
58 */
59 addScroll : function(){return true;},
60 /**
61 * Called at destruction time
62 * Perform all the clean operations (stopping polling queries, etc.)
63 */
64 close : function(){return true;}
65 }
66 });