Welcome!

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

Reply
New Developer
Posts: 41
Registered: ‎04-06-2010
My Device: 9780
My Carrier: Rogers

Question about KeywordFilterField - Please help!

[ Edited ]

Hi Guys,

Please help Smiley Sad

I'm trying to build something similar to BB native Contacts app using KeywordFilterField where one can edit/add/delete contacts from a list. When finished the list would be saved.

 

I have a Contacts class which has a list (vector) of contacts (instances of Contact class). I feed that list (vector) to a SortedReadableList and use this object to construct a KeywordFilterField containing names of contacts.

 

My Contact class implements Persistable which allows me to persist the vector in my Contacts class.

 

My issue:

What's the best way to sync between my Contacts vector and the data in KeywordFilterField?

i.e if i add or remove an element in KeywordFilterField list, i have to do the same in my Contacts vector but sometimes the indexes of the elements are different in my vector and in my KeywordFilterField list since KeywordFilterField sorts the list after every operation.

 

I suppose i could keep the vector sorted or work with objects instead of indexes but i have a feeling that i'm doing something terribly wrong.

 

Any help would be greatly appreciated.

 

 

 

 

New Developer
Posts: 41
Registered: ‎04-06-2010
My Device: 9780
My Carrier: Rogers

Re: Question about KeywordFilterField - Please help!

[ Edited ]

 Anybody?

New Developer
Posts: 41
Registered: ‎04-06-2010
My Device: 9780
My Carrier: Rogers

Re: Question about KeywordFilterField - Please help!

bump