]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - org.argeo.cms/src/org/argeo/cms/maintenance/Browse.java
Session authentication working
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / maintenance / Browse.java
index 83f62fc8a433dd0d5848fba33b59c4f39fdefb63..98792575bf92e982521eb4b16d7cb84cc5be5362 100644 (file)
@@ -17,6 +17,7 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 
 import org.argeo.ArgeoException;
+import org.argeo.cms.CmsException;
 import org.argeo.cms.CmsTypes;
 import org.argeo.cms.CmsUiProvider;
 import org.argeo.cms.text.Img;
@@ -79,7 +80,7 @@ public class Browse implements CmsUiProvider {
                        throws RepositoryException {
                if (context == null)
                        // return null;
-               throw new CmsException("Context cannot be null");
+                       throw new CmsException("Context cannot be null");
                GridLayout layout = CmsUtils.noSpaceGridLayout();
                layout.numColumns = 2;
                parent.setLayout(layout);
@@ -255,6 +256,9 @@ public class Browse implements CmsUiProvider {
                        currParPath = JcrUtils.parentPath(currNodePath);
                if ("".equals(currParPath))
                        currParPath = "/";
+               
+               
+               
 
                Object[][] colMatrix = new Object[browserCols.size()][2];
 
@@ -291,6 +295,15 @@ public class Browse implements CmsUiProvider {
                                ((FilterEntitiesVirtualTable) colMatrix[l][1]).dispose();
                        }
 
+               // Remove disposed columns
+               // TODO investigate and fix the mechanism that leave them there after
+               // disposal
+               if (browserCols.containsKey(currNodePath)) {
+                       FilterEntitiesVirtualTable currCol = browserCols.get(currNodePath);
+                       if (currCol.isDisposed())
+                               browserCols.remove(currNodePath);
+               }
+
                if (!browserCols.containsKey(currNodePath))
                        createBrowserColumn(colViewer, node);
 
@@ -329,6 +342,10 @@ public class Browse implements CmsUiProvider {
 
        private Point imageWidth = new Point(250, 0);
 
+       /**
+        * Recreates the content of the box that displays information about the
+        * current selected node.
+        */
        private Control createNodeView(Composite parent, Node context)
                        throws RepositoryException {