On Tue, Aug 19, 2008 at 11:35 AM, Ed Leafe <[EMAIL PROTECTED]> wrote:
>        You'd still have to determine what column in the dataset was the key;
> what column(s) should be displayed. Where would the 'savings' be?

I think the most benefit you would see would be one to one mappings.
For instance, you have a book cataloging database.  Each book can be
assigned a category.  For data integrity and storage optimization, you
have a categories table that has a varchar field for category and a
int field as it's PK.  A categoryID field is then added to books.  I
use this type of setup all the time.  I want to use a dropdown list
control populated with the varchar representation of the categories so
the user can select a valid one.  However, I need to store it as a
integer id.  You have to do some fuddling to get it to work (and I
know already about the "don't fight the framework" bit).  It would be
WONDERFUL if it were automated...

On Tue, Aug 19, 2008 at 11:42 AM, Paul McNett <[EMAIL PROTECTED]> wrote:
> Yes and I have always intended to pursue that. But Keys and Choices were
> so easy to use that I never expanded on it to make it more automatic. My
> original thought was to have, in addition to:
>
> DataSource:
> The bizobj that contains the field to save the value (the selection in
> the list) to.
>
> DataField:
> The field that we save the value (the selection in the list) to.
>
> RowSource:
> The bizobj that contains the rows to present as choices.
>
> RowField:
> The field in the bizobj that we display as choices (could be a
> VirtualField).
>
> RowKey:
> The field in the RowSource bizobj to use as the Value (to save to
> DataField).
>
> Like I said, I think this sounds like a nice addition to
> dControlItemMixin, but never had time to continue the thought. What do
> you think of this design though?

+100

I like it.  It makes the bizobj code so much easier as I don't have to
do a join to get the field value from the current data entry and then
do some code for entry and edit.  I can have 2 bizobjs, autogenerated
and completely boiler plate, and can use the frameworks data access
feature (DataSource and DataField) as proper.


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to