Help Center
Local Navigation
- Creating user interfaces
- Storing data
- Creating connections
- Managing applications
- Using custom messages and folders in the message list
- Applications for push content
- Localizing BlackBerry device applications
- Controlling access to APIs and application data
- Testing a BlackBerry device application
- Packaging and distributing a BlackBerry Java Application
- Glossary
- Provide feedback
- Legal notice
BlackBerry Manuals & Help
>
Documentation for Developers
>
Java Development Guides and API Reference
>
Development Guide - BlackBerry Java Development Environment - 4.7.0
Notify the system when a collection changes
- Import the net.rim.device.api.collection.CollectionListener interface.
- To notify the system when an element is added to a SyncCollection,
invoke CollectionListener.elementAdded().
for( int i=0; i<_listeners.size(); i++ ) { CollectionListener cl = (CollectionListener)_listeners.elementAt( i ); cl.elementAdded( this, object ); } return true; } - To notify the system when an element in a SyncCollection is replaced, invoke CollectionListener.elementUpdated().
- Invoke CollectionListener.elementRemoved().
Parent topic: Collections