Switching from one DataSource to another is a two-step process:

The prepareNextDataSource and performSwitch methods send a SwitchingDataSourceEvent to each listener specified by the SwitchingDataSourceEventListener property of the SwitchingDataSource. This event can be of type PREPARE or SWITCH.

When you invoke the SwitchingDataSource.performSwitch() method, the SwitchingDataSource switches the value of the currentDataSource property to the DataSource specified by the nextDataSource property.

 
loading table of contents...