]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/IView.js
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.
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.
12 * @author Charles du Jeu
14 qx
.Interface
.define("org.argeo.ria.components.IView", {
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.
24 check
:"org.argeo.ria.components.ViewSelection"
26 instanceId
: {init
:""},
27 instanceLabel
: {init
:""}
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
39 init : function(viewPane
, data
){return true;},
41 * The implementation should contain the real data loading (i.o. query...)
44 load : function(){return true;},
46 * Whether this component is already contained in a scroller (return false) or not (return true).
49 addScroll : function(){return true;},
51 * Called at destruction time
52 * Perform all the clean operations (stopping polling queries, etc.)
54 close : function(){return true;}