X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=security%2Fruntime%2Forg.argeo.security.ria%2Fsrc%2Fargeo-ria-lib%2Fsecurity%2Fclass%2Forg%2Fargeo%2Fsecurity%2Fria%2FRolesApplet.js;h=3533221af41a90ee4aed32c0b57b47721005acb8;hb=b9d6c8b6386de221d1a316f8e2c1ffec4b7bffce;hp=676aaa3d9bbf46b55020b2dfffe0c3cae0b0eb40;hpb=f7c73e12f9534b0b796686e207dd4b43193977fa;p=lgpl%2Fargeo-commons.git 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());