]> git.argeo.org Git - gpl/argeo-slc.git/blob - server/org.argeo.slc.ria/src/argeo-ria-src/class/org/argeo/ria/components/IView.js
Get rid of all SLC reference in Argeo RIA / Split icons.
[gpl/argeo-slc.git] / server / org.argeo.slc.ria / src / argeo-ria-src / class / org / argeo / ria / components / IView.js
1 /**
2 * Interface for a standard 'view' of an argeo RIA. A view is an independant applet that
3 * will be integrated inside a ViewPane.
4 * If this view is to implement a selection (a list, a tree, etc) that will trigger changes on commands,
5 * it must trigger a viewSelection#changeSelection event.
6 *
7 * The typical lifecycle of an IView will be the following :
8 * <br>+ init(viewPane) : initialize basic GUI in the viewPane
9 * <br>+ getCommands() : wire the commands and add them to the toolbars/menubars
10 * <br>+ load(data) : loads the data itself.
11 *
12 * @author Charles du Jeu
13 */
14 qx.Interface.define("org.argeo.ria.components.IView", {
15
16 properties : {
17 /**
18 * The commands definition Map that will be automatically added and wired to the menubar and toolbar.
19 * See {@link org.argeo.ria.event.CommandsManager#definitions} for the keys to use for defining commands.
20 */
21 commands : {},
22 viewSelection : {
23 nullable:false,
24 check:"org.argeo.ria.components.ViewSelection"
25 },
26 instanceId : {init:""},
27 instanceLabel : {init:""}
28 },
29
30 members : {
31 /**
32 * The implementation should contain the GUI initialisation.
33 * This is the role of the manager to actually add the graphical component to the pane,
34 * so it's not necessary to do it here.
35 * @param viewPane {org.argeo.ria.components.ViewPane} The pane manager
36 * @param data {Mixed} Any object or data passed by the initiator of the view
37 * @return {Boolean}
38 */
39 init : function(viewPane, data){return true;},
40 /**
41 * The implementation should contain the real data loading (i.o. query...)
42 * @return {Boolean}
43 */
44 load : function(){return true;},
45 /**
46 * Whether this component is already contained in a scroller (return false) or not (return true).
47 * @return {Boolean}
48 */
49 addScroll : function(){return true;},
50 /**
51 * Called at destruction time
52 * Perform all the clean operations (stopping polling queries, etc.)
53 */
54 close : function(){return true;}
55 }
56 });