projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
There is indeed a getRoleList service
[lgpl/argeo-commons.git]
/
security
/
runtime
/
org.argeo.security.ria
/
src
/
argeo-ria-lib
/
security
/
class
/
org
/
argeo
/
security
/
ria
/
RolesApplet.js
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 676aaa3d9bbf46b55020b2dfffe0c3cae0b0eb40..3533221af41a90ee4aed32c0b57b47721005acb8 100644
(file)
--- 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(){
* @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 = [];
var data = [];
- r
olesList
.forEach(function(el){data.push([el]);});
- this.tableModel.setData(data);
+ r
esponse.getContent()
.forEach(function(el){data.push([el]);});
+ this.tableModel.setData(data);
}, this);
}, 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());
var commands = this.getCommands();
this.toolBarPart.add(commands["new_role"].command.getToolbarButton());
this.toolBarPart.add(commands["delete_role"].command.getToolbarButton());