On Sep 30, 2008, at 12:55 PM, Richard Esplin wrote:

> My application UI is divided into two parts. The left side is a list  
> of
> records pulled from a table. The right side is the detailed view of  
> the
> record selected in the list on the left. The user can examine this  
> detailed
> view, change it, and save it back into the database. This is a one- 
> to-one
> relationship, as both grids will come out of the same database table.
>
> Best practices suggest that I should only have one bizobj for each  
> table in
> the database, so that I don't have to duplicate validation, etc. I  
> have found
> a lot of examples of a parent/child relationship between UI  
> elements, but
> they all assume that each element has its own BizObj within whose  
> afterInit
> methods I should call either addChild or LinkField.

        If the data is all from the same table, then you only need one  
bizobj. When a new record is selected on the left side, all you have  
to do is issue self.Form.update(), and all the bound controls will  
update to show the current record's values.

> One solution I've considered is to create a parent RecordBizObj, and  
> subclass
> it as ListRecordBizObj and DetailedRecordBizObj. I'm working on this
> approach, but I'm unsure how to wire everything together.
>
> Is there a better way to do this? Is the Dabo approach to this already
> documented somewhere?


        Unless I'm missing something, you don't need separate bizobjs.

-- Ed Leafe





_______________________________________________
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