Refactor Argeo APIs
[gpl/argeo-suite.git] / swt / org.argeo.app.ui / src / org / argeo / app / ui / library / ContentEntryArea.java
index e5b474bc178e192fd489225999d2a4ba3defebcc..aa939d6fd6b9f9a339e4e7cf74fa8e3b69f97bcd 100644 (file)
@@ -1,11 +1,12 @@
 package org.argeo.app.ui.library;
 
 import org.argeo.api.acr.Content;
+import org.argeo.api.acr.NamespaceUtils;
 import org.argeo.api.acr.spi.ProvidedContent;
+import org.argeo.api.app.EntityType;
 import org.argeo.api.cms.CmsLog;
 import org.argeo.api.cms.ux.CmsView;
-import org.argeo.app.api.EntityType;
-import org.argeo.app.ui.SuiteEvent;
+import org.argeo.app.ux.SuiteUxEvent;
 import org.argeo.cms.swt.CmsSwtUtils;
 import org.argeo.cms.swt.acr.SwtUiProvider;
 import org.argeo.cms.swt.widgets.SwtTreeView;
@@ -26,7 +27,7 @@ public class ContentEntryArea implements SwtUiProvider {
 
                new Label(parent, 0).setText(context.toString());
 
-               Content rootContent = ((ProvidedContent) context).getSession().getRepository().get().get("/srv");
+               Content rootContent = ((ProvidedContent) context).getSession().getRepository().get().get("/sys");
 
                ContentHierarchicalPart contentPart = new ContentHierarchicalPart() {
 
@@ -36,7 +37,9 @@ public class ContentEntryArea implements SwtUiProvider {
                                        return true;
                                return super.isLeaf(content);
                        }
+
                };
+               contentPart.addColumn((c) -> NamespaceUtils.toPrefixedName(c.getName()));
                contentPart.setInput(rootContent);
 
                SwtTreeView<Content> view = new SwtTreeView<>(parent, 0, contentPart);
@@ -46,7 +49,7 @@ public class ContentEntryArea implements SwtUiProvider {
                contentPart.onSelected((o) -> {
                        Content c = (Content) o;
                        log.debug(c.getPath());
-                       cmsView.sendEvent(SuiteEvent.refreshPart.topic(), SuiteEvent.eventProperties(c));
+                       cmsView.sendEvent(SuiteUxEvent.refreshPart.topic(), SuiteUxEvent.eventProperties(c));
                });
                return view;
        }