dabo Commit
Revision 1523
Date: 2005-11-06 17:52:00 -0800 (Sun, 06 Nov 2005)
Author: paul

Changed:
U   trunk/dabo/biz/dBizobj.py
U   trunk/dabo/lib/datanav/Page.py

Log:
I'm working on getting relations working for AppWizardX. dBizobj had code that
was assuming that the bizobjs would be named "Biz" + DataSource.title(). I
replaced that code to match the datasource, and not the name of the bizobj.

Removed an obsolete line which would have been causing errors in all 1:M apps
ever since my grid changes a couple months ago.


Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py   2005-11-06 15:45:26 UTC (rev 1522)
+++ trunk/dabo/biz/dBizobj.py   2005-11-07 01:52:00 UTC (rev 1523)
@@ -979,7 +979,14 @@
                                        
                                childBiz = self.getChildByDataSource(target)
                                if not childBiz:
-                                       childBizClass = 
bizModule.__dict__["Biz" + target.title()]
+                                       # target is the datasource of the 
bizobj to find.
+                                       childBizClass = None
+                                       for candidate, candidateClass in 
bizModule.__dict__.items():
+                                               if type(candidateClass) == type:
+                                                       candidateInstance = 
candidateClass(self._conn)
+                                                       if 
candidateInstance.DataSource.lower() == target.lower():
+                                                               childBizClass = 
candidateClass
+
                                        childBiz = childBizClass(self._conn)
                                        self.addChild(childBiz)
                                        addedChildren.append(childBiz)

Modified: trunk/dabo/lib/datanav/Page.py
===================================================================
--- trunk/dabo/lib/datanav/Page.py      2005-11-06 15:45:26 UTC (rev 1522)
+++ trunk/dabo/lib/datanav/Page.py      2005-11-07 01:52:00 UTC (rev 1523)
@@ -690,7 +690,6 @@
                                        grid = self.addObject(Grid.Grid, 
"BrowseGrid" + child)
                                        grid.FieldSpecs = 
self.Form.getFieldSpecsForTable(child)
                                        grid.DataSource = child
-                                       grid.setBizobj(childBiz)
                                        self.childGrids.append(grid)
                                        grid.populate()
                                        #grid.Height = 100




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to