How to populate a Listfield with results from a Autocomplete field using Blackberry API?

This is the code to get Contacts, returns a vector containing string array.. contact0 is name, contact1 is email and contact2 is contact number.

This is the code to get Contacts, returns a vector containing string array.. contact0 is name, contact1 is email and contact2 is contact number.. read elements from vector and set autocompleteField:Example: docs.blackberry.com/en/developers/delive... private Vector getContacts() { Vector result = new Vector(); try { BlackBerryContactList contactList = (BlackBerryContactList) PIM.getInstance(). OpenPIMList(PIM. CONTACT_LIST, PIM.

READ_ONLY); Enumeration enumx = contactList.items(); while (enumx.hasMoreElements()) { BlackBerryContact c = (BlackBerryContact) enumx.nextElement(); String contact = new String3; if (contactList. IsSupportedField(BlackBerryContact. NAME)) { String name = c.

GetStringArray(BlackBerryContact. NAME, 0); String firstName = nameContact. NAME_GIVEN; String lastName = nameContact.

NAME_FAMILY; System.out. Println("this is contact..........." + firstName); contact0 = firstName + " " + lastName; } if (contactList. IsSupportedField(BlackBerryContact.

EMAIL)) { StringBuffer emails = new StringBuffer(); int emailCount = c. CountValues(BlackBerryContact. EMAIL); for (int I = 0; I 0)) { int numValues = 0; try { numValues = c.

CountValues(BlackBerryContact. TEL); } catch (Exception localException) { } String mobileNumber = ""; String homeNumber = ""; String workNumber = ""; for (int I = 0; I TEL, i) == BlackBerryContact. ATTR_WORK) workNumber = c.

GetString(BlackBerryContact.TEL, i); else if (c. GetAttributes(BlackBerryContact. TEL, i) == BlackBerryContact.

ATTR_HOME) homeNumber = c. GetString(BlackBerryContact. TEL, i); else if (c.

GetAttributes(BlackBerryContact. TEL, i) == BlackBerryContact. ATTR_MOBILE) mobileNumber = c.

GetString(BlackBerryContact. TEL, i); } if (!mobileNumber. EqualsIgnoreCase("")) contact2 = mobileNumber.toString(); else if (!homeNumber.

EqualsIgnoreCase("")) contact2 = homeNumber.toString(); else if (!workNumber. EqualsIgnoreCase("")) contact2 = workNumber.toString(); } result. AddElement(contact); } } catch (PIMException ex) { ex.printStackTrace(); } return result; }.

There's a sample app provided with the developer tools that demonstrates the use of this field. From your developer tools directory go to samples/com/rim/samples/device/ui/autocompletefielddemo and you'll see the AutoCompleteFieldDemo. Java app.

I am through with the autocompletefield part. What I am unable to do is create a list box below the autocomplete field and populate the list field with results from the autocomplete field. Any help would be appreciated – Taha Feb 12 '10 at 11:13 I'm not sure what you mean - the AutoCompleteField has a built-in list below the input field that shows the current results.

Why do you need another list? – Marc Novakowski Feb 12 '10 at 20:12 Then I should be looking to customize the ListField provided with the AutoCompleteField. Any ideas how to make it look like the Contacts search interface.

– Taha Feb 17 '10 at 4:58 customizing a Blackberry ListField has been answered at the following link stackoverflow. Com/questions/1872160/… – Taha Feb 17 '10 at 5:00.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions