[Tree Extension Project] Initializes tree in ApplicationDictionaryCachedStructures
authorAugusto Mauch <augusto.mauch@openbravo.com>
Fri, 07 Feb 2014 14:38:01 +0100
changeset 22506 c852439d2ef1
parent 22505 470f9cbb581d
child 22507 babab6914b4b
[Tree Extension Project] Initializes tree in ApplicationDictionaryCachedStructures
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java	Thu Feb 06 10:48:14 2014 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java	Fri Feb 07 14:38:01 2014 +0100
@@ -37,6 +37,8 @@
 import org.openbravo.model.ad.domain.ModelImplementation;
 import org.openbravo.model.ad.domain.Reference;
 import org.openbravo.model.ad.domain.ReferencedTable;
+import org.openbravo.model.ad.domain.ReferencedTree;
+import org.openbravo.model.ad.domain.ReferencedTreeField;
 import org.openbravo.model.ad.ui.AuxiliaryInput;
 import org.openbravo.model.ad.ui.Field;
 import org.openbravo.model.ad.ui.Tab;
@@ -146,6 +148,7 @@
     if (c.getReferenceSearchKey() != null) {
       initializeReference(c.getReferenceSearchKey());
     }
+
   }
 
   private void initializeReference(Reference reference) {
@@ -159,6 +162,11 @@
       SelectorField displayField = s.getDisplayfield();
       initializeDALObject(displayField);
     }
+    for (ReferencedTree t : reference.getADReferencedTreeList()) {
+      initializeDALObject(t);
+      ReferencedTreeField displayField = t.getDisplayfield();
+      initializeDALObject(displayField);
+    }
 
   }