Paul,

On 03/02/2011 14:29, Werner F. Bruhin wrote:
...
>> However I can't figure out a way to get at the Bizobj, obviously using
>> GetGrandParent() is a hack (and on top it returns "None").
>>
Got it to work, but still feels like a bit of a hack.

Have this now:

class PagSelectCellarbook(PagSelectBase):

     def getSelectOptionsPanel(self):
         """Return the panel to contain all the select options."""

         biz = self.GetGrandParent().getBizobj()


class PagEditCellarbook(PagEditBase):

     def createItems(self):
         """Called by the datanav framework, when it is time to create 
the controls."""

         biz = self.GetGrandParent().getBizobj()

And in the grd this:
class GrdCellarbook(GrdBase):

     def afterInitAll(self):
         self.super()
         biz = self.getBizobj()



Here I needed afterInitAll to make it work.

Is the basic approach acceptable?  If yes, I clean things up and create 
a trac entry with a patch for it all.

Werner

_______________________________________________
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