johnf wrote:
> Hi,
> I have a class "MainForm"
> class MainForm(dabo.ui.dForm):
>       
>       def afterInit(self):
>               self.Sizer = dabo.ui.dSizer("vertical")
>               self.Sizer.append1x(MainPanel(self))
>               self.layout()
>               self.txtCustomerNum.Enabled = True
>       def createBizobjs(self):
>               self.Application.addConnectFile("DeanConnection.cnxml")
>               conn = self.Application.getConnectionByName("DeanConn")
>               self.super()
>               class PublicarcustBizobj(dabo.biz.dBizobj):
>                       def afterInit(self):
>                               self.DataSource = "public.arcust"
>                               self.KeyField = "pkid"
>                               self.addFrom("public.arcust")
>                               self.addField("ccustno")
>                               self.addField("caddr1")
>                               self.addField("caddr2")
>                               self.addField("nbalance")
>                               self.addField("ccity")
>                               self.addField("pkid")
>                               print "hello world biz"
>       
>                       def validateRecord(self):
>                               """Returning anything other than an empty 
> string from
>                               this method will prevent the data from being 
> saved.
>                               """
>                               ret = ""
>                               # Add your business rules here. 
>                               return ret
>       
>               publicarcustBizobj = PublicarcustBizobj(conn)
>               self.addBizobj(publicarcustBizobj)
> 
> I have several textboxes in my "MainPanel"
> txtbox= dabo.ui.dTextBox(self, RegID="txtAddress1",TextLength = 35,DataSource 
> =mytable, DataField = "caddr1")
> 
> I have provided the DataSource and DataField.  

Did you? The code you just posted doesn't show a valid DataSource. It 
should read:

txtbox = dabo.ui.dTextBox(self, RegID="txtAddress1",
   TextLength=35, DataSource="public.arcust",
   DataField="caddr1")

> I open a dShell and issue a 
> self.requery() - returns true.

Also issue:
 >>> b = self.getBizobj("public.arcust")
 >>> print b
 >>> print b.getDataSet()[0]

Just to make sure your bizobj is doing the right thing.

> But my textboxes display nothing.  What do I call to get my textboxes to 
> update with the correct data?

You can do an explicit txtbox.update(), but if you do the requery 
through the form you shouldn't need that.

-- 
pkm ~ http://paulmcnett.com


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

Reply via email to