On Sat, May 16, 2009 at 10:27 PM, johnf <jfabi...@yolo.com> wrote:

> On Saturday 16 May 2009 10:55:06 am Miguel Lopes wrote:
> > Hi,
> >
> > I have MainForm with a dPageFrameNoTabs that holds several dPages
> > (accounts, opportunities, servicecases).
> > My goal is to have a single location to navigate, new, delete, save, and
> > whatever actions are "common" to all the pages in the MainForm Toolbar (a
> > VCR control).
> >
> ...
>
> > * Use different Bizobjs depending on the selected dPage. In order to do
> > this every time a dPage changes (in the dPageFrameNoTabs),
> > self.dataSourceParameter is updated to the relevant bizobj.
>
> You can have as many bizobjs as required.  The very first defined bizobj is
> the PrimaryBizobj by default.  Are each of the bizobjs independent of each
> other?


There are independent groups of bizobjs. Elaborating, two are:
   - AccountsBizobj has some child bizobjs (Contacts and Opportunities), I
append "Acct" so the dependency is clear: AcctContactsBizobj,
AcctOpptiesBizobj
   - OpptyBizobj has for children: OpptyContactsBizobj, OpptyServCasesBizobj

AccountsBizobj and OpptyBizobj are truly independent.


> > * I'm know the MainForm is aware of its primaryBizobj, so the
> > dataSourceParameter as a parameter in every VCR call to MainForm methods.
> I
> > do this because the VCR has no way of knowing if dPage has changed:
>
> I think there maybe lots of ways to handle this.  I think I would create a
> method for next() and test for the active page.  Something like:
> def next(self,evt):
>   if thisPage_IsActive:
>      self.thisPageBizobj.next()
>  ## write code to move to the next record in the bizobj - if required
>

That's an approach. Though I'm trying to be able to add a new dPage to the
dPageFrameNoTabs without having to update extra code. In any case, if I keep
this restricted to the Toolbar buttons, it might work. I can live with just
7 methods or little more to update.


> OR
>  you could just set a Form property as you enter the dPage in the next()
> that
> would set the name of the bizobj.
>
> def next(self,evt):
>   eval(self.varName.next())
>

If I understand you as the dPage is changed a Form var would be set to the
bizobj corresponding to the Form. So that the next method would end up being
called at the bizobj level.
If you do it at the bizobj level, then you take responsability to keep the
UI in sync with the bizobj right!? Won't that make it more convoluted?

What about changing the forms primaryBizobj? I've checked the docs and
peeked at the source and it seems to be ok. Can't we just do:
self.Form.primaryBizobj = relevantBizobj every time the Page changes, and
then just let the framework do its job?


> Did you mean 'new'?  Normally, VCR's buttons are not associated with the
> new().  Normally they are next,last,first,prior.


Yes. Apart from Navigation, I'm including New, Delete and Save buttons in
the toolbar.


>
> If you have a many
> to many issue - let me know and I'll send you a copy of a recent discussion
> one a way to handle the problem.
>

Please, do send the copy of the discussion. It will certainly be helpful to
me. Txs!



> >
> > I see the following issues/doubts:
> > * Maybe to may Bizobjs under the form may slow things due to lots of data
> > loading.
>
> I have not seen to much of an issue with the number of bizobjs the form
> requires.  Retrieving lots of data might be but the number does not seems
> to
> effect very much.


Data might be an issue. But with the proper design I can postpone requery of
certain bizobj groups until it is called for. For example the app starts
with AccountsPage showing, thus AccountBizobj (and children) are requeried,
but OpportunitiesPage requery can be postponed until it is used (The user
triggers a dPage change).

>
> > * MainForm.dataSourceParameter is used in a way it's not designed to. But
> I
> > don't see a problem there, do you?
>
> I've never used the dataSourceParameter.


To my best knowledge (little), the dataSourceParameter is used to capture
the dataSource argument in Form methods like next, so that a reference to
the relevant dataSource is around for methods like beforeXXX and afterXXX.

> Like I asked, does this make sense. What's your opinion/ approach?
> >
> > Miguel
>
>
> --
> John Fabiani
> _______________________________________________
> Post Messages to: Dabo-users@leafe.com
> 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/200905161427.40953.jfabi...@yolo.com
>


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/a19730800905161702l3aace76la60aed2b7131...@mail.gmail.com

Reply via email to