Scenario an Agency has SubAgencies linked...... thus we have a
AgencySubAgencyList table (AgencyID, SubAgencyID)
Windows app form with two list boxes - lstAvailableAgencies and
lstAgenciesSelected, two buttons Add, Remove.
Typical scenario is to click Add to move an item from
lstAvailableAgencies into the table/listbox lstAgenciesSelected (and
remove button to de-select).
My thoughts are to have two NVL csal objects as datasource for the
list boxes
The Add button then calls a stored procedure to insert into
AgencySubAgencyList table then refresh the two lists (clear cache and
do database call -to show new item in 'Selected' and remove item from
available list (not selected)
Or is there a better way? maybe using EditableRootCollection and
ChildObjects to Add/remove from collection etc
Please you thoughts, thanks.
There is an OO concept that's important here - object stereotypes. These are a set of common behaviors and a broad purpose for an object.
NVLB supports a specific stereotype, which is intended to make it easy to populate read-only list/combobox controls.
BusinessListBase/BusinessBase support editable object scenarios. You want the editable root list stereotype, because that supports editing of lists and/or the objects contained in the lists.
Copyright (c) Marimer LLC