Improve form framework.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / widgets / JcrComposite.java
index a3cdb9827f31027c057b21350b9a503f1a8c1fd8..0708365bda6f33d25957251df1fafbc060fa0bfd 100644 (file)
@@ -37,11 +37,11 @@ public class JcrComposite extends Composite {
                if (item != null)
                        try {
                                this.session = item.getSession();
-                               if (!cacheImmediately && (SWT.READ_ONLY == (style & SWT.READ_ONLY))) {
-                                       // (useless?) optimization: we only save a pointer to the session,
-                                       // not even a reference to the item
-                                       this.nodeId = null;
-                               } else {
+//                             if (!cacheImmediately && (SWT.READ_ONLY == (style & SWT.READ_ONLY))) {
+//                                     // (useless?) optimization: we only save a pointer to the session,
+//                                     // not even a reference to the item
+//                                     this.nodeId = null;
+//                             } else {
                                        Node node;
                                        Property property = null;
                                        if (item instanceof Node) {
@@ -56,7 +56,7 @@ public class JcrComposite extends Composite {
                                        this.nodeId = node.getIdentifier();
                                        if (cacheImmediately)
                                                this.cache = node;
-                               }
+//                             }
                                setLayout(CmsUiUtils.noSpaceGridLayout());
                        } catch (RepositoryException e) {
                                throw new IllegalStateException("Cannot create composite from " + item, e);