We're updating the issue view to help you get more done. 

BusinessObjectBinding.EnsureDataSource should not throw exception if the control does not exist any more

Description

BusinessObjectBinding.EnsureDataSource throws a HttpException if !isDesignMode and _dataSourceControl could not be found.
This leads to problems if the page changed i.e. in the EventHandling phase of the life cycle, because SmartPageInfo (_trackedControls, _trackedControlsByID) still contains the controls, which have now been removed or replaced.

Note: The behavior in BusinessObjectBinding.EnsureDataSource() is correct, given that a datasource ID has been assigned but the control cannot find the datasource if it has been removed from the page tree. Changing this bahvior might introduce sideeffects and new bugs. Therefor, it is simply stated that invoking the problematic operation must be guarded by a check for page. In this instance, it is the visibility check that triggers the bug. Alternatively, it is also possible to properly remove the control from the collection upon unload.

Assignee

Michael Ketting

Reporter

SJ

Labels

None

Time tracking

5h

Components

Fix versions

Affects versions

Priority

Normal
Configure