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
Developer
JoVinz
Posts: 255
Registered: ‎05-03-2012
My Device: 9930

Re: Searching ListField ??

In the above code how can i get compared value in serchItem in getKeyWords method?
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Searching ListField ??

I think you are mixing up KeyWordFilterField and ListField.  They are two different approaches.  KeyWordFilterField requires that you abstract things in the way you are trying to do.  This seemed to be confusing you in another Thread, so I suggested that you try to do the slightly simpler approach of using ListField and a search box.  I recommend that you choose one method or the other and only work on it, that way hopefully, you will find it less confusing.  And can I recommend that you do this step at a time.  Get a ListField working displaying your list items, then start thinking about searching it.  Again I think you are confusing yourself by trying to do too much too quickly.  Make sure you understand the concepts before you move on.  Cut and paste coding will work for a while, but when it breaks, if you have not understood what it is based on, you will not have any idea how to fix it. 

 

Just my opinion.

Developer
JoVinz
Posts: 255
Registered: ‎05-03-2012
My Device: 9930

Re: Searching ListField ??

[ Edited ]

I have a ListField and a searchbox(TextField t) on a screen. My ListField is Working properly. ListField contents are in Vector v.

here is my keyChar event.

protected boolean keyChar(char key, int status, int time){

if (key == Characters.ENTER)
{
if(v.contains(t.getText()))
{

}
}
return false;
}

 

What should be done in "if " if i want to display search results?

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Searching ListField ??

Developer
JoVinz
Posts: 255
Registered: ‎05-03-2012
My Device: 9930

Re: Searching ListField ??