]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/editors/UserEditor.java
Work on user and group editors. Comment out legacy code that use old userAdminService
[lgpl/argeo-commons.git] / org.argeo.security.ui.admin / src / org / argeo / security / ui / admin / editors / UserEditor.java
index a811f86216b0eaf7ab2d77e244f854908eaaed6e..f2f233fe4f3a3f9a5613bb6d0c0e15dd595d8f78 100644 (file)
@@ -16,6 +16,7 @@
 package org.argeo.security.ui.admin.editors;
 
 import org.argeo.ArgeoException;
+import org.argeo.security.ui.admin.SecurityAdminImages;
 import org.argeo.security.ui.admin.SecurityAdminPlugin;
 import org.argeo.security.ui.admin.internal.UserAdminConstants;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -56,6 +57,8 @@ public class UserEditor extends FormEditor implements UserAdminConstants {
                // firePartPropertyChanged("icon", "icons/user.gif", "icons/users.gif");
                // }
                setPartName(commonName != null ? commonName : "username");
+               setTitleImage(user.getType() == Role.GROUP ? SecurityAdminImages.ICON_GROUP
+                               : SecurityAdminImages.ICON_USER);
        }
 
        /** Exposes the user (or group) that is displayed by the current editor */
@@ -63,13 +66,17 @@ public class UserEditor extends FormEditor implements UserAdminConstants {
                return user;
        }
 
+       void updateEditorTitle(String title) {
+               setPartName(title);
+       }
+
        protected void addPages() {
                try {
 
                        if (user.getType() == Role.GROUP)
                                addPage(new GroupMainPage(this, userAdmin));
                        else
-                               addPage(new UserMainPage(this));
+                               addPage(new UserMainPage(this, userAdmin));
 
                } catch (Exception e) {
                        throw new ArgeoException("Cannot add pages", e);