dabodemo Commit
Revision 488
Date: 2007-01-22 10:20:09 -0800 (Mon, 22 Jan 2007)
Author: Paul

Changed:
U   trunk/OneToManyApp/biz/Base.py
U   trunk/OneToManyApp/ui/FrmBase.py
U   trunk/OneToManyApp/ui/FrmCustomer.py
U   trunk/OneToManyApp/ui/GrdBase.py
U   trunk/OneToManyApp/ui/PagBase.py
U   trunk/OneToManyApp/ui/PagEditBase.py
U   trunk/OneToManyApp/ui/PagSelectBase.py
U   trunk/OneToManyApp/ui/PagSelectCustomer.py

Log:
Updated the OneToManyApp to use datanav2.


Diff:
Modified: trunk/OneToManyApp/biz/Base.py
===================================================================
--- trunk/OneToManyApp/biz/Base.py      2007-01-18 16:20:15 UTC (rev 487)
+++ trunk/OneToManyApp/biz/Base.py      2007-01-22 18:20:09 UTC (rev 488)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-import dabo.lib.datanav as datanav
+import dabo.lib.datanav2 as datanav
 
 class Base(datanav.Bizobj):
 

Modified: trunk/OneToManyApp/ui/FrmBase.py
===================================================================
--- trunk/OneToManyApp/ui/FrmBase.py    2007-01-18 16:20:15 UTC (rev 487)
+++ trunk/OneToManyApp/ui/FrmBase.py    2007-01-22 18:20:09 UTC (rev 488)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 
 import dabo.ui
-import dabo.lib.datanav as datanav
+import dabo.lib.datanav2 as datanav
 
 
 class FrmBase(datanav.Form):

Modified: trunk/OneToManyApp/ui/FrmCustomer.py
===================================================================
--- trunk/OneToManyApp/ui/FrmCustomer.py        2007-01-18 16:20:15 UTC (rev 
487)
+++ trunk/OneToManyApp/ui/FrmCustomer.py        2007-01-22 18:20:09 UTC (rev 
488)
@@ -18,8 +18,6 @@
 
 
        def afterInit(self):
-               self.super()
-
                app = self.Application
                bizCustomer = app.biz.Customer(app.dbConnection)
                bizOrders = app.biz.Orders(app.dbConnection, 
LinkField="cust_fk")
@@ -27,5 +25,5 @@
                self.addBizobj(bizCustomer)
                self.addBizobj(bizOrders)
                
-               self.creation()
+               self.super()
 

Modified: trunk/OneToManyApp/ui/GrdBase.py
===================================================================
--- trunk/OneToManyApp/ui/GrdBase.py    2007-01-18 16:20:15 UTC (rev 487)
+++ trunk/OneToManyApp/ui/GrdBase.py    2007-01-22 18:20:09 UTC (rev 488)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-import dabo.lib.datanav as datanav
+import dabo.lib.datanav2 as datanav
 
 
 class GrdBase(datanav.Grid):

Modified: trunk/OneToManyApp/ui/PagBase.py
===================================================================
--- trunk/OneToManyApp/ui/PagBase.py    2007-01-18 16:20:15 UTC (rev 487)
+++ trunk/OneToManyApp/ui/PagBase.py    2007-01-22 18:20:09 UTC (rev 488)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-import dabo.lib.datanav as datanav
+import dabo.lib.datanav2 as datanav
 
 
 class PagBase(datanav.Page):

Modified: trunk/OneToManyApp/ui/PagEditBase.py
===================================================================
--- trunk/OneToManyApp/ui/PagEditBase.py        2007-01-18 16:20:15 UTC (rev 
487)
+++ trunk/OneToManyApp/ui/PagEditBase.py        2007-01-22 18:20:09 UTC (rev 
488)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-import dabo.lib.datanav as datanav
+import dabo.lib.datanav2 as datanav
 
 
 class PagEditBase(datanav.EditPage):

Modified: trunk/OneToManyApp/ui/PagSelectBase.py
===================================================================
--- trunk/OneToManyApp/ui/PagSelectBase.py      2007-01-18 16:20:15 UTC (rev 
487)
+++ trunk/OneToManyApp/ui/PagSelectBase.py      2007-01-22 18:20:09 UTC (rev 
488)
@@ -3,7 +3,7 @@
 import dabo
 from dabo.dObject import dObject
 import dabo.dEvents as dEvents
-import dabo.lib.datanav as datanav
+import dabo.lib.datanav2 as datanav
 
 IGNORE_STRING = datanav.IGNORE_STRING
 

Modified: trunk/OneToManyApp/ui/PagSelectCustomer.py
===================================================================
--- trunk/OneToManyApp/ui/PagSelectCustomer.py  2007-01-18 16:20:15 UTC (rev 
487)
+++ trunk/OneToManyApp/ui/PagSelectCustomer.py  2007-01-22 18:20:09 UTC (rev 
488)
@@ -31,24 +31,16 @@
                lbl.Caption = "Company:"
                lbl.relatedDataField = "company"
 
-               # First try getting the selector options from the user hook:
-               opt = self.Form.getSelectOptionsForField("company")
-                       
-               if opt is None:
-                       # Automatically get the selector options based on the 
field type:
-                       opt = self.getSelectorOptions("char", wordSearch=False)
+               # Automatically get the selector options based on the field 
type:
+               opt = self.getSelectorOptions("char", wordSearch=False)
 
                # Add the blank choice and create the dropdown:
                opt = (IGNORE_STRING,) + tuple(opt)
                opList = SelectionOpDropdown(panel, Choices=opt)
                        
-               # First try getting the control class from the user hook:
-               ctrlClass = self.Form.getSelectControlClassForField("company")
+               # Automatically get the control class based on the field type:
+               ctrlClass = self.getSearchCtrlClass("char")
 
-               if ctrlClass is None:
-                       # Automatically get the control class based on the 
field type:
-                       ctrlClass = self.getSearchCtrlClass("char")
-
                if ctrlClass is not None:
                        ctrl = ctrlClass(panel)
                        if not opList.StringValue:
@@ -78,24 +70,16 @@
                lbl.Caption = "City:"
                lbl.relatedDataField = "city"
 
-               # First try getting the selector options from the user hook:
-               opt = self.Form.getSelectOptionsForField("city")
-                       
-               if opt is None:
-                       # Automatically get the selector options based on the 
field type:
-                       opt = self.getSelectorOptions("char", wordSearch=False)
+               # Automatically get the selector options based on the field 
type:
+               opt = self.getSelectorOptions("char", wordSearch=False)
 
                # Add the blank choice and create the dropdown:
                opt = (IGNORE_STRING,) + tuple(opt)
                opList = SelectionOpDropdown(panel, Choices=opt)
                        
-               # First try getting the control class from the user hook:
-               ctrlClass = self.Form.getSelectControlClassForField("city")
+               # Automatically get the control class based on the field type:
+               ctrlClass = self.getSearchCtrlClass("char")
 
-               if ctrlClass is None:
-                       # Automatically get the control class based on the 
field type:
-                       ctrlClass = self.getSearchCtrlClass("char")
-
                if ctrlClass is not None:
                        ctrl = ctrlClass(panel)
                        if not opList.StringValue:
@@ -125,24 +109,16 @@
                lbl.Caption = "Postal Code:"
                lbl.relatedDataField = "postalcode"
 
-               # First try getting the selector options from the user hook:
-               opt = self.Form.getSelectOptionsForField("postalcode")
-                       
-               if opt is None:
-                       # Automatically get the selector options based on the 
field type:
-                       opt = self.getSelectorOptions("char", wordSearch=False)
+               # Automatically get the selector options based on the field 
type:
+               opt = self.getSelectorOptions("char", wordSearch=False)
 
                # Add the blank choice and create the dropdown:
                opt = (IGNORE_STRING,) + tuple(opt)
                opList = SelectionOpDropdown(panel, Choices=opt)
                        
-               # First try getting the control class from the user hook:
-               ctrlClass = 
self.Form.getSelectControlClassForField("postalcode")
+               # Automatically get the control class based on the field type:
+               ctrlClass = self.getSearchCtrlClass("char")
 
-               if ctrlClass is None:
-                       # Automatically get the control class based on the 
field type:
-                       ctrlClass = self.getSearchCtrlClass("char")
-
                if ctrlClass is not None:
                        ctrl = ctrlClass(panel)
                        if not opList.StringValue:
@@ -172,24 +148,16 @@
                lbl.Caption = "Country:"
                lbl.relatedDataField = "country"
 
-               # First try getting the selector options from the user hook:
-               opt = self.Form.getSelectOptionsForField("country")
-                       
-               if opt is None:
-                       # Automatically get the selector options based on the 
field type:
-                       opt = self.getSelectorOptions("char", wordSearch=False)
+               # Automatically get the selector options based on the field 
type:
+               opt = self.getSelectorOptions("char", wordSearch=False)
 
                # Add the blank choice and create the dropdown:
                opt = (IGNORE_STRING,) + tuple(opt)
                opList = SelectionOpDropdown(panel, Choices=opt)
                        
-               # First try getting the control class from the user hook:
-               ctrlClass = self.Form.getSelectControlClassForField("country")
+               # Automatically get the control class based on the field type:
+               ctrlClass = self.getSearchCtrlClass("char")
 
-               if ctrlClass is None:
-                       # Automatically get the control class based on the 
field type:
-                       ctrlClass = self.getSearchCtrlClass("char")
-
                if ctrlClass is not None:
                        ctrl = ctrlClass(panel)
                        if not opList.StringValue:
@@ -219,24 +187,16 @@
                lbl.Caption = "Max. Order Amt.:"
                lbl.relatedDataField = "maxordamt"
 
-               # First try getting the selector options from the user hook:
-               opt = self.Form.getSelectOptionsForField("maxordamt")
-                       
-               if opt is None:
-                       # Automatically get the selector options based on the 
field type:
-                       opt = self.getSelectorOptions("float", wordSearch=False)
+               # Automatically get the selector options based on the field 
type:
+               opt = self.getSelectorOptions("float", wordSearch=False)
 
                # Add the blank choice and create the dropdown:
                opt = (IGNORE_STRING,) + tuple(opt)
                opList = SelectionOpDropdown(panel, Choices=opt)
                        
-               # First try getting the control class from the user hook:
-               ctrlClass = self.Form.getSelectControlClassForField("maxordamt")
+               # Automatically get the control class based on the field type:
+               ctrlClass = self.getSearchCtrlClass("float")
 
-               if ctrlClass is None:
-                       # Automatically get the control class based on the 
field type:
-                       ctrlClass = self.getSearchCtrlClass("float")
-
                if ctrlClass is not None:
                        ctrl = ctrlClass(panel)
                        if not opList.StringValue:




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

Reply via email to