Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 54
Registered: ‎06-07-2010
My Device: 9780
My Carrier: sw

how to delete itema from objectlist field



i m using persistent storage for storing data in objectlists...i insert data...and now iwont to deleteselected data from objectlist...hw to delete selected item 4m objectlist..

plz help me


thanks in adv...



Posts: 106
Registered: ‎06-18-2009
My Device: Bold

Re: how to delete itema from objectlist field

I believe your answer includes two things that you need to do.


1. Since you said you are storing the data of the ObjectListField, you have to manually maintain your data.  That said, when you remove an item from the ObjectListField, remove it from your data as well and then persist your data again.


2. To remove an item from the ObjectListField, use the delete method with the index of the item that you want to remove. such as:






How are you storing your data? If it is a vector, you can do






If this helped you, press the thumbs up button (on the far right - '+' thumb icon)
If this post solved the issue, click "Accept as Solution"