From b9d6c8b6386de221d1a316f8e2c1ffec4b7bffce Mon Sep 17 00:00:00 2001 From: Charles du Jeu Date: Sat, 19 Sep 2009 19:39:01 +0000 Subject: [PATCH] There is indeed a getRoleList service git-svn-id: https://svn.argeo.org/commons/trunk@2983 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../class/org/argeo/security/ria/RolesApplet.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js index 676aaa3d9..3533221af 100644 --- a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js +++ b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js @@ -306,20 +306,15 @@ qx.Class.define("org.argeo.security.ria.RolesApplet", * @param data {Element} The text xml description. */ load : function(){ - // WARNING, THE USERS APPLET MUST BE LOADED! - var vManager = org.argeo.ria.components.ViewsManager.getInstance(); - this.usersAppletReference = vManager.getViewPaneById("users").getContent(); - this.usersAppletReference.addListener("changeRolesList", function(event){ - var rolesList = event.getData(); + var service = org.argeo.security.ria.SecurityAPI.getListRolesService(); + service.addListener("completed", function(response){ var data = []; - rolesList.forEach(function(el){data.push([el]);}); - this.tableModel.setData(data); + response.getContent().forEach(function(el){data.push([el]);}); + this.tableModel.setData(data); }, this); - /* - var data = [["ROLE_ADMIN"],["ROLE_USER"]]; - this.tableModel.setData(data); - */ + service.send(); + var commands = this.getCommands(); this.toolBarPart.add(commands["new_role"].command.getToolbarButton()); this.toolBarPart.add(commands["delete_role"].command.getToolbarButton()); -- 2.30.2