return;
}
var uniqueValue = this._selectionToValues(selectionModel)[0];
- var initSelection = this.rolesUsersStub[uniqueValue];
+ //var initSelection = this.rolesUsersStub[uniqueValue];
+ this.usersAppletReference.applySelection(uniqueValue, "roles");
+ var initSelection = this.usersAppletReference.getViewSelection().getNodes();
this.setChooserOriginalSelection(initSelection);
this.setChooserSelectionModified(false);
- this.usersAppletReference.applySelection(initSelection, "username");
this.saveButton.setEnabled(false);
},
* Load a given row : the data passed must be a simple data array.
* @param data {Element} The text xml description.
*/
- load : function(){
- var data = [["ROLE_ADMIN"],["ROLE_USER"]];
- this.tableModel.setData(data);
+ load : function(){
+
+ var service = org.argeo.security.ria.SecurityAPI.getListRolesService();
+ service.addListener("completed", function(response){
+ var data = [];
+ response.getContent().forEach(function(el){data.push([el]);});
+ this.tableModel.setData(data);
+ }, this);
+ service.send();
var commands = this.getCommands();
this.toolBarPart.add(commands["new_role"].command.getToolbarButton());