Notify the system when a collection changes

  1. Import the net.rim.device.api.collection.CollectionListener interface.
  2. 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;
    }
    
  3. To notify the system when an element in a SyncCollection is replaced, invoke CollectionListener.elementUpdated().
  4. Invoke CollectionListener.elementRemoved().

Index


Was this information helpful? Send us your comments.