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

New Developer
New Developer
Posts: 16
Registered: ‎08-03-2009
My Device: Not Specified

Dynamically updating listfield items

Hi all,


I am having listfield with 10 records.


I want to update the listfield data with server changes.


I am using the drawListRow() method to initialize the listfield by passing a vector object and showing 10 records in first time.


Whenever there is a change in the server, i am getting the newly added records from the server maybe 2 or 3 records.


What i need is , how can i add these new records to the top of the listfield  display and push the current records to one slot down according to incoming records. And i need to remove the last record from listfield according to adding in the top. Similar to a queue, adding a record to top , shifting current records to down and remove the last one from the bottom.


is it possible to do this thing in listfield?

I need to update the entire listfield or not.


Please give some sample code for doing this



General question, How can i mark one reply as 'Accepted solution'












Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Dynamically updating listfield items

This is possible. You just need to use the insert method of ListField and specify teh index where you want to insert. Same goes for inserting to ListFieldCallback.


You can find on right side.. Accept Solution button.

Use Search. "Accept Solution" If the problem is resolved.