Work on user facets
[gpl/argeo-suite.git] / org.argeo.app.ui / src / org / argeo / app / ui / people / PersonUiProvider.java
index 17dc29bd2c5d45b0bd7abc41e19f0cda1dfadb5f..c82edbc443b7d133e0d880770124e1bd0582fa9a 100644 (file)
@@ -62,6 +62,16 @@ public class PersonUiProvider implements CmsUiProvider {
                                if (roles.contains(role))
                                        radio.setSelection(true);
                        }
+
+//                     Composite facetsSection = new Composite(main, SWT.NONE);
+//                     facetsSection.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
+//                     facetsSection.setLayout(new GridLayout());
+//                     if (context.hasContentClass(LdapObjs.groupOfNames.qName())) {
+//                             String[] members = context.attr(LdapAttrs.member.qName()).split("\n");
+//                             for (String member : members) {
+//                                     new Label(facetsSection, SWT.NONE).setText(member);
+//                             }
+//                     }
                }
 
 //             if (user instanceof Group) {
@@ -116,7 +126,10 @@ public class PersonUiProvider implements CmsUiProvider {
                EditableText text = new EditableText(parent, SWT.SINGLE | SWT.FLAT);
                text.setLayoutData(CmsSwtUtils.fillWidth());
                text.setStyle(SuiteStyle.simpleInput);
-               text.setText(context.attr(attr.qName()));
+               String txt = context.attr(attr.qName());
+               if (txt == null) // FIXME understand why email is not found in IPA
+                       txt = "";
+               text.setText(txt);
                text.setMouseListener(new MouseAdapter() {
 
                        @Override