I wan to send the message to multiple contacts in the contactlist
list=new List("Select Contacts", List.MULTIPLE);
int n=list.getFitPolicy();
list.setTicker(ticker);
contactmanipulation.getContactData(vector);
for(int j=0;j<vector.size();j++){
listofContacts=new ListofContacts();
listofContacts=(ListofContacts)vector.elementAt(j);
list.setFitPolicy(1);
list.append(listofContacts.contactname + " "+ listofContacts.contactno,null);
}
list.addCommand(ok);
list.addCommand(cancel);
list.setCommandListener(this);
display.setCurrent(list);
here i have taken all the contacts of contact list in vector and the listofcontacts is the class containing the name and number. To show the list of contacts for selection i am using list control with multiple choice.
The code is working fine and message is sent to all the contacts which are selected by the user but as we know there may be 1000 of contacts in phonebook and in these case to select a particular user we have to scroll down the list. Now how to keep the search facility so that we can directly go to the required contact and if it is not possible with the list control which control is to be used so that multiple contacts can be selected and also search facility is available.