X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-src%2Fclass%2Forg%2Fargeo%2Fria%2Fcomponents%2FIView.js;h=4607788ee2bff3e33f4f43d091dd523a9ae15e4d;hb=86f06959d772c750a516780b448d5cbfa16cd48e;hp=3d3cd1aa3797aa7b3514a98e4b99369af1ecdfc5;hpb=a10c083ba5bde2d7ebb466153c99858247ddb0aa;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/IView.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/IView.js index 3d3cd1aa3..4607788ee 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/IView.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/IView.js @@ -1,6 +1,8 @@ /** * Interface for a standard 'view' of an argeo RIA. A view is an independant applet that * will be integrated inside a ViewPane. + * If this view is to implement a selection (a list, a tree, etc) that will trigger changes on commands, + * it must trigger a viewSelection#changeSelection event. * * The typical lifecycle of an IView will be the following : *
+ init(viewPane) : initialize basic GUI in the viewPane @@ -12,27 +14,43 @@ qx.Interface.define("org.argeo.ria.components.IView", { properties : { - commands : {} + /** + * The commands definition Map that will be automatically added and wired to the menubar and toolbar. + * See {@link org.argeo.ria.event.CommandsManager#definitions} for the keys to use for defining commands. + */ + commands : {}, + viewSelection : { + nullable:false, + check:"org.argeo.ria.components.ViewSelection" + }, + instanceId : {init:""}, + instanceLabel : {init:""} }, members : { /** * The implementation should contain the GUI initialisation. + * This is the role of the manager to actually add the graphical component to the pane, + * so it's not necessary to do it here. * @param viewPane {org.argeo.ria.components.ViewPane} The pane manager + * @param data {Mixed} Any object or data passed by the initiator of the view * @return {Boolean} */ - init : function(viewPane){return true;}, + init : function(viewPane, data){return true;}, /** * The implementation should contain the real data loading (i.o. query...) - * @param data {mixed} Any data in any format * @return {Boolean} */ - load : function(data){return true;}, + load : function(){return true;}, /** - * Whether this component is already contained in a scroller - * (return false) or not (return true). + * Whether this component is already contained in a scroller (return false) or not (return true). * @return {Boolean} */ - addScroll : function(){return true;} + addScroll : function(){return true;}, + /** + * Called at destruction time + * Perform all the clean operations (stopping polling queries, etc.) + */ + close : function(){return true;} } }); \ No newline at end of file