On Saturday, December 04, 2010 09:06:33 am Carey Gagnon wrote:
> > Frameworks fails to restore RowMumber in saveAll() method
> > because one of your children doesn't have requery parameter set.
> 
> Thanks  Jacek. You pointed me in the right direction with your replay:
> 
> I changed:
> 
> ## *!* ## Dabo Code ID: dDropdownList-dPanel
> def afterInit(self):
>     biz = self.Form.getBizobj("builders")
>     names, pks = biz.getBuilders()
>     self.Choices = names
>     self.Keys = pks
>     self.ValueMode = "Key"
> 
> 
> to:
> 
> ## *!* ## Dabo Code ID: dDropdownList-dPanel
> def afterInit(self):
>     biz = self.Form.getBizobj("builders")
>     names, pks = biz.getBuilders()
>     self.Choices = names
>     self.Keys = pks
>     self.ValueMode = "Key"
>     self.Form.requery()  <<<<<<<<<----------------------------------------
> Added This line
> 
> and the error message is gone.
> 
> How do you set up database logging?
> 
> Carey

I'm glad it works now.  However, I think I should point out that requery() has 
lot's of little side effects and can be very costly in terms of performance.

When you requery you are setting/resetting the data which causes the controls 
to be updated().  That may or may not be what you want done.  Can you imagine 
what the performance hit would be if you five or six dropdowns on your form 
all making calls to requery().  

In my code I have always accounted for the possible null key value.  Maybe 
that's your real issue.  But I don't know!

Johnf


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to