List of Lists

List of Lists

Old forum URL: forums.lhotka.net/forums/t/9363.aspx


SeanO posted on Wednesday, August 11, 2010

Is there a way to create a list of lists in CSLA?  For example, I have a ForwardCurve editable child list of Price child objects.  I want to have a parent object ForwardCurves which contains all of the currently existing ForwardCurve editable child lists.

RockfordLhotka replied on Wednesday, August 11, 2010

A BLB can't directly contain another BLB - it must contain a BB, which in turn can contain a BLB.

This is because, as a general rule, data binding requires a singular object against which it can bind. Data binding ignores properties on list objects - assuming the list is only interesting due to the things it contains.

In other words, even if I allowed a BLB to directly contain other BLB objects, data binding would (almost never) work with your objects.

Since one of the primary features of the editable object stereotypes is to support data binding, this is against their goal.

SeanO replied on Wednesday, August 11, 2010

Thanks.  That probably actually makes more sense for my object model's design anyway.

Copyright (c) Marimer LLC