On Tuesday, November 16, 2010 10:17:19 am Jacek Kałucki wrote:
> Użytkownik John Fabiani napisał:
> > I have always wondered if there where better ways to deal with a dynamic
> > changing datasets.  Is there a way to setup the bizobj in createBizobj
> > that would allow the dynamic dataset to follow a bizobj?  For example is
> > there someway to use the ParentLinkField and LinkField of a bizobj to
> > allow a one to many relationship to follow multi-where parameters?
> 
> Hi.
> 
> By default, Dabo doesn't support compound FK fields.
> Maybe I'm wrong, but other options are limited too.
> Personally, I use remarkable modified framework code that allows:
> 1) compound FK keys, like "table1.fld1,table1.fld2"
> 2) use dBizobj attributes as data fields,
>       e.g. dTextBox(parent, DataSource=bizOne, DataField="myAttribute")
> 
> But I think, that simplest solution for you, it would be
> to overwrite dBizobj.setChildLinkFilter() mehod to return
> parameter tuple as you need.
> You may also use mehod used in dabo.lib.datanav package.

Yes I had considered your suggest of over writing the method.  

But I'd like to stay within the framework if possible.

Currently I provide two methods to the parent bizobj class both are built-in 
hooks:

def afterRequery(self): which I use to init my dataset the first time.

def afterPointerMove(self): 

Both call the same routine as described in my earlier email.  This works well 
and does cause my special dataset to follow the parent bizobj record movement.

I wonder if there might be a way to use the virtualfield of a parent.  
Consider that the afterInit has occurred - if the parent is called first.  
then wouldn't the virtual field be available to the children?

Or maybe some other way I haven't thought of yet.

Thanks Jacek for your thoughts.

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