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
Trusted Contributor
Posts: 115
Registered: ‎03-24-2011
My Device: 8310 curve
My Carrier: PLAY

AutoCompletteField

Hi, i have some problem...

 

I have write code to display phone number whet type some numers in autocomplete field.

 

This is my code:

 

filterList.addDataSource(1,
        BasicFilteredList.DATA_SOURCE_CONTACTS,
        BasicFilteredList.DATA_FIELD_CONTACTS_PHONE_ALL,
        BasicFilteredList.DATA_FIELD_CONTACTS_PHONE_ALL |
        BasicFilteredList.DATA_FIELD_CONTACTS_NAME_FULL | 
        BasicFilteredList.DATA_FIELD_CONTACTS_COMPANY | 
        BasicFilteredList.DATA_FIELD_CONTACTS_PHONE_ALL,
        BasicFilteredList.DATA_FIELD_CONTACTS_PHONE_ALL, 
        -1,null);

 When type number 66, autocompletefield show me all numbers start with 66 etc.

 

But, how to add code to display name and number? You know, when type "Mama" show me number and name Smiley Happy

 

THX for reply Smiley Happy

 
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: AutoCompletteField

try this

 

filterLst.addDataSource(1,
BasicFilteredList.DATA_SOURCE_CONTACTS,
BasicFilteredList.DATA_SOURCE_CONTACTS,
BasicFilteredList.DATA_FIELD_CONTACTS_ALL,
BasicFilteredList.DATA_FIELD_CONTACTS_NAME_FULL,
BasicFilteredList.DATA_FIELD_CONTACTS_NAME_FIRST,"Test");

Trusted Contributor
Posts: 115
Registered: ‎03-24-2011
My Device: 8310 curve
My Carrier: PLAY

Re: AutoCompletteField

[ Edited ]

It works, but not as he wants.

 

Your code shows me such a thing:

 

 

I'm talking about something like this:

 

 

Generally, as I type this name  would like to have his number and name of your choice.

As I click the phone number shown in autocompetefield phone number. As I click on the name it shows the name.

 
 
 
 
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: AutoCompletteField

I cant see the pics...

 

Can you please detail ur requirement.

Trusted Contributor
Posts: 115
Registered: ‎03-24-2011
My Device: 8310 curve
My Carrier: PLAY

Re: AutoCompletteField

hxxp://dl.dropbox.com/u/28246801/Forum%20PMBB/Zdjecia/BBCF/ACF.jpg

 

hxxp://dl.dropbox.com/u/28246801/Forum%20PMBB/Zdjecia/BBCF/CFP.jpg

 

Rename xx to tt Smiley Wink

 
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: AutoCompletteField

Sorry but my netword does not allow me to access drop box..

 

Can you please explain me in few lines what exactly u wanted

Trusted Contributor
Posts: 115
Registered: ‎03-24-2011
My Device: 8310 curve
My Carrier: PLAY

Re: AutoCompletteField

I wont to display name and number for this name when type MAMA or BROTHER etc...your code show only names...

 

Or when type number like 663  ....   show me name and number too Smiley Wink

 
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: AutoCompletteField

I do not think there is any inbuild functionality availabel in BB...

 

Even BB 's Contacts does not work that way....

 

I think you need to design your own control.....