]> git.argeo.org Git - lgpl/argeo-commons.git/blob - security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/Perspective.js
clear/load data on userChange in editorPrefPane
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.ria / src / argeo-ria-lib / security / class / org / argeo / security / ria / Perspective.js
1 /**
2 * IPerspective Implementation : Horizontal split pane defining two panes,
3 * "list" and "applet".
4 */
5 /* ************************************************************************
6
7 #asset(resource/org.argeo.security.ria/*)
8
9 ************************************************************************ */
10
11 qx.Class.define("org.argeo.security.ria.Perspective", {
12 extend : qx.core.Object,
13 implement : [org.argeo.ria.components.IPerspective],
14
15 construct : function() {
16 this.base(arguments);
17 },
18
19 statics : {
20 LABEL : "RIA Security",
21 ICON : "org.argeo.security.ria/preferences-security.png",
22 ACCESS:"!ROLE_ANONYMOUS"
23 },
24
25
26 members : {
27
28 initViewPanes : function(viewsManager) {
29
30 this._firstSplit = new qx.ui.splitpane.Pane("horizontal");
31 this._secondSplit = new qx.ui.splitpane.Pane("horizontal");
32 this._secondSplit.setDecorator(null);
33
34 var rolesPane = new org.argeo.ria.components.ViewPane("roles", "Roles");
35 viewsManager.registerViewPane(rolesPane);
36 var usersPane = new org.argeo.ria.components.ViewPane("users", "Users");
37 viewsManager.registerViewPane(usersPane);
38 var editorPane = new org.argeo.ria.components.TabbedViewPane("editor", "Editor");
39 viewsManager.registerViewPane(editorPane);
40
41 this._firstSplit.add(rolesPane, 1);
42 this._firstSplit.add(this._secondSplit, 4);
43
44 this._secondSplit.add(usersPane, 3);
45 this._secondSplit.add(editorPane, 4);
46
47 viewsManager.getViewPanesContainer().add(this._firstSplit, {flex : 1});
48 },
49
50 initViews : function(viewsManager) {
51
52 var rolesView = viewsManager.initIViewClass(org.argeo.security.ria.RolesApplet, "roles");
53 var usersView = viewsManager.initIViewClass(org.argeo.security.ria.UsersApplet, "users");
54
55 rolesView.load();
56 usersView.load();
57
58 },
59
60 remove : function(viewsManager) {
61 viewsManager.getViewPanesContainer().remove(this._firstSplit);
62 }
63
64 }
65
66 });