/**\r
* Interface for a standard 'view' of an argeo RIA. A view is an independant applet that \r
* will be integrated inside a ViewPane. \r
+ * If this view is to implement a selection (a list, a tree, etc) that will trigger changes on commands, \r
+ * it must trigger a viewSelection#changeSelection event.\r
* \r
* The typical lifecycle of an IView will be the following :\r
* <br>+ init(viewPane) : initialize basic GUI in the viewPane\r
qx.Interface.define("org.argeo.ria.components.IView", {\r
\r
properties : {\r
- commands : {}\r
+ /**\r
+ * The commands definition Map that will be automatically added and wired to the menubar and toolbar.\r
+ * See {@link org.argeo.ria.event.CommandsManager#definitions} for the keys to use for defining commands.\r
+ */\r
+ commands : {},\r
+ viewSelection : {\r
+ nullable:false, \r
+ check:"org.argeo.ria.components.ViewSelection"\r
+ },\r
+ instanceId : {init:""},\r
+ instanceLabel : {init:""}\r
},\r
\r
members : {\r
/**\r
* The implementation should contain the GUI initialisation.\r
+ * This is the role of the manager to actually add the graphical component to the pane, \r
+ * so it's not necessary to do it here. \r
* @param viewPane {org.argeo.ria.components.ViewPane} The pane manager\r
+ * @param data {Mixed} Any object or data passed by the initiator of the view\r
* @return {Boolean}\r
*/\r
- init : function(viewPane){return true;},\r
+ init : function(viewPane, data){return true;},\r
/**\r
* The implementation should contain the real data loading (i.o. query...)\r
- * @param data {mixed} Any data in any format\r
* @return {Boolean}\r
*/\r
- load : function(data){return true;},\r
+ load : function(){return true;},\r
/**\r
- * Whether this component is already contained in a scroller \r
- * (return false) or not (return true).\r
+ * Whether this component is already contained in a scroller (return false) or not (return true).\r
* @return {Boolean}\r
*/\r
- addScroll : function(){return true;}\r
+ addScroll : function(){return true;},\r
+ /**\r
+ * Called at destruction time\r
+ * Perform all the clean operations (stopping polling queries, etc.) \r
+ */\r
+ close : function(){return true;}\r
}\r
});
\ No newline at end of file