X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fsource%2Fclass%2Forg%2Fargeo%2Fria%2Fcomponents%2FIView.js;fp=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fsource%2Fclass%2Forg%2Fargeo%2Fria%2Fcomponents%2FIView.js;h=3d3cd1aa3797aa7b3514a98e4b99369af1ecdfc5;hb=4ab05384ea181aff4e789094c332a658554c5abe;hp=619aecad44dc28ed10ad2d4666b3f117b100e756;hpb=882f8f01558c1280645a8d823cc689d21fcea1c5;p=gpl%2Fargeo-slc.git
diff --git a/org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/components/IView.js b/org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/components/IView.js
index 619aecad4..3d3cd1aa3 100644
--- a/org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/components/IView.js
+++ b/org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/components/IView.js
@@ -1,6 +1,13 @@
/**
- * @author Charles du Jeu
+ * Interface for a standard 'view' of an argeo RIA. A view is an independant applet that
+ * will be integrated inside a ViewPane.
+ *
+ * The typical lifecycle of an IView will be the following :
+ *
+ init(viewPane) : initialize basic GUI in the viewPane
+ *
+ getCommands() : wire the commands and add them to the toolbars/menubars
+ *
+ load(data) : loads the data itself.
*
+ * @author Charles du Jeu
*/
qx.Interface.define("org.argeo.ria.components.IView", {
@@ -9,14 +16,23 @@ qx.Interface.define("org.argeo.ria.components.IView", {
},
members : {
- init : function(viewPane){
- return true;
- },
- load : function(data){
- return true;
- },
- addScroll : function(){
- return true;
- }
+ /**
+ * The implementation should contain the GUI initialisation.
+ * @param viewPane {org.argeo.ria.components.ViewPane} The pane manager
+ * @return {Boolean}
+ */
+ init : function(viewPane){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;},
+ /**
+ * Whether this component is already contained in a scroller
+ * (return false) or not (return true).
+ * @return {Boolean}
+ */
+ addScroll : function(){return true;}
}
});
\ No newline at end of file