From 491094a0f29847d649a3168eca18eca38e3ee7ff Mon Sep 17 00:00:00 2001 From: Charles du Jeu Date: Thu, 15 Jan 2009 10:52:53 +0000 Subject: [PATCH] New function close() in the IView interface git-svn-id: https://svn.argeo.org/slc/trunk@2102 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../sample/class/org/argeo/ria/sample/Applet.js | 4 ++++ .../sample/class/org/argeo/ria/sample/List.js | 6 +++++- .../slc-web/class/org/argeo/slc/web/TestList.js | 9 ++++++++- .../slc/class/org/argeo/slc/ria/Applet.js | 14 ++++++++++---- .../class/org/argeo/slc/ria/LauncherApplet.js | 17 +++++++---------- .../class/org/argeo/ria/components/IView.js | 7 ++++++- 6 files changed, 40 insertions(+), 17 deletions(-) diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/sample/class/org/argeo/ria/sample/Applet.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/sample/class/org/argeo/ria/sample/Applet.js index e12457a57..1830d09ac 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/sample/class/org/argeo/ria/sample/Applet.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/sample/class/org/argeo/ria/sample/Applet.js @@ -66,6 +66,10 @@ qx.Class.define("org.argeo.ria.sample.Applet", addScroll : function(){ return false; }, + + close : function(){ + return false; + }, /** * Create a simple HtmlElement and and insert the html string.. diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/sample/class/org/argeo/ria/sample/List.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/sample/class/org/argeo/ria/sample/List.js index 1b2453065..57d2468e3 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/sample/class/org/argeo/ria/sample/List.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/sample/class/org/argeo/ria/sample/List.js @@ -108,6 +108,10 @@ qx.Class.define("org.argeo.ria.sample.List", addScroll : function(){ return false; - } + }, + + close : function(){ + + } } }); \ No newline at end of file diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc-web/class/org/argeo/slc/web/TestList.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc-web/class/org/argeo/slc/web/TestList.js index cd7f6d913..1654755c9 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc-web/class/org/argeo/slc/web/TestList.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc-web/class/org/argeo/slc/web/TestList.js @@ -428,6 +428,13 @@ qx.Class.define("org.argeo.slc.web.TestList", addScroll : function(){ return false; - } + }, + + close : function(){ + if(this.timer){ + this.pollListLoading(false); + } + } + } }); \ No newline at end of file diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/Applet.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/Applet.js index 8bc2fed76..eae241abe 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/Applet.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/Applet.js @@ -39,7 +39,9 @@ qx.Class.define("org.argeo.slc.ria.Applet", toolbar : "result", callback : function(e){ // Call service to delete - this.getView().empty(); + this.getView().empty(); + //alert(this.testId); + }, selectionChange : function(viewId, xmlNode){ if(viewId != "applet") return; @@ -70,9 +72,9 @@ qx.Class.define("org.argeo.slc.ria.Applet", // Load XML or Whatever var service; var NSMap = {slc:"http://argeo.org/projects/slc/schemas"}; - var testId = qx.dom.Node.getText(org.argeo.ria.util.Element.selectSingleNode(this.data, "slc:uuid")); - this.getView().setViewTitle("Test "+testId); - var request = org.argeo.slc.ria.SlcApi.getLoadResultService(testId); + this.testId = qx.dom.Node.getText(org.argeo.ria.util.Element.selectSingleNode(this.data, "slc:uuid")); + this.getView().setViewTitle("Test "+this.testId); + var request = org.argeo.slc.ria.SlcApi.getLoadResultService(this.testId); request.addListener("completed", function(response){ this.createXmlGui(response.getContent()); this.getView().setOnLoad(false); @@ -86,6 +88,10 @@ qx.Class.define("org.argeo.slc.ria.Applet", return false; }, + close : function(){ + + }, + /** * Creates the GUI. * @param responseXml {Document} The xml response of the "load" query. diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/LauncherApplet.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/LauncherApplet.js index b008aba06..162453861 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/LauncherApplet.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/LauncherApplet.js @@ -112,7 +112,7 @@ qx.Class.define("org.argeo.slc.ria.LauncherApplet", this.add(this.scroll, {edge:'west'}); this.logModel = new qx.ui.table.model.Simple(); - this.logModel.setColumns(["Date", "Agent Uuid", "Status", "Type"]); + this.logModel.setColumns(["Date", "Agent Uuid", "Status"]); this.logPane = new qx.ui.table.Table(this.logModel, { tableColumnModel: function(obj){ return new qx.ui.table.columnmodel.Resize(obj) @@ -129,7 +129,6 @@ qx.Class.define("org.argeo.slc.ria.LauncherApplet", }); var columnModel = this.logPane.getTableColumnModel(); columnModel.getBehavior().setWidth(2, "12%"); - columnModel.getBehavior().setWidth(3, "12%"); }, _createForm : function(){ @@ -153,13 +152,12 @@ qx.Class.define("org.argeo.slc.ria.LauncherApplet", serviceManager.addListener("reload", function(reloadEvent){ if(reloadEvent.getDataType()!= "agents") return ; var xmlDoc = reloadEvent.getContent(); - var NSMap = {slc:"http://argeo.org/projects/slc/schemas"}; - var nodes = org.argeo.ria.util.Element.selectNodes(xmlDoc, "//slc:slc-agent-descriptor", NSMap); + var nodes = org.argeo.ria.util.Element.selectNodes(xmlDoc, "//slc:slc-agent-descriptor"); var newTopics = {}; for(var i=0;i