On Monday 11 January 2010 02:36:26 pm Emanuele Gesuato wrote:
> Thanks, now i understand the difference from dFormMain and dForm but
> please be patient but i haven't understand how to "design" my
> application with dabo.
>
> Imagine to have firefox open with three tabs. Each of them can shows
> data from different tables (but it can happen that two pages uses the
> same tables).

Dabo does the above in a very straight forward way.  And it is very common to 
have forms with tabs where the data is shared between tabs.

> I think i should have three dForm each for every dPanel; is it right ?

No - only one dForm.  There are exceptions - but trust me - I doubt they apply 
here.

>
> RIght now the startup script of my app starts a dForm and in the dForm
> i create the pageFrame
> with three tabs but in this way i have to add all the bizobjs used by
> my application in a single dForm.
> Is it a correct approach ?

Yes - you can have as many bizobj's as required - all associated with one 
dForm.  Not to confuse - you add all of the bizobj's (happens in the 
createBizobjs method ) to the dForm.  You are not adding bizobj's to 
panels/tabs or any other container but to dForm.

> A dForm can have single primary bizobj so 
> in this way i have to switch
> the primary bizobj when i change tab but i don't think it is a correct
> approach. It seems a dirty way.

You do not switch any primary bizobj's.   If you need to sent up parent child 
relationships.  You do so in the createBizobjs method.  Please review
http://wiki.dabodev.com/HowToSetupParentChildGrandchild
also review
http://wiki.dabodev.com/FAQs "Dabo Bizobj Questions".

>
> But how i can have three dForm one for each dPanel ?

You should not! Each panel is a container.  In the panels you add controls 
(date boxes, text boxes, etc).  And controls are associated with data fields 
that are defined in bizobjs.  And the bizobjs were defined in the dForm.

When you add a panel (remember it is a container) and then add controls to the 
panel.  Each of the controls will have access to the bizobj (the data).  
Because the panel was added to dForm and dForm has access to the data.

> If the tab i display is a (in sense of IS-A relationship) dPanel can i
> have an (HAS-A) relationship with a dForm inside the dPanel.
> I tried this way here:
> http://pastebin.com/m1966b047
Please review
http://wiki.dabodev.com/HowToSetupParentChildGrandchild
also
http://wiki.dabodev.com/FAQs
>
> (the dForm is at row 21) but i have some strange behaviour. When i
> press "save" in debug all it seems ok but the record isn't added to
> the grid neither in the table. However it seems that dForm was born to
> be extended, or at least or the examples i've seen are built in this
> way.

I have no idea what is happening here.  But I suggest you get a better 
understanding of Dabo before attempting to debug a save issue.
>
> I'm in need to extend dPanel for adding a tab in a dPageFrame but also
> i want to extend a dForm for a data-aware gui.

Panels are containers.  You can add any and all the controls as required.  
That includes dPageFrame.  If you add any data aware control to a dForm (even 
if is in a different tab, panel or any container) it will have access to the 
data in the bizobjs.  

Panels can contain other panels.  PageFrames tabs can contain panels.  dForms 
can contain panels.  Panels are containers!  You don't add bizobjs to 
panels - only to the dForm.
>
> Is it something wrong with my approach ?
> How i have to proceed ?

Yes - see above.
>
> Thanks for any help and sorry for nuisance ^^
> Emanuele

Please read the above links.  You are missing a basic understanding of how the 
Dabo framework works.  
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