• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Is there somebody who can help me?  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If not, at least answer me that is impossible to do such a thing in j2me.(They are 4 days that I'm waiting an answer...)Thank you.
I display all records(contacts of an addressbook) of a recordStore in a List.This addressbook contains 3 fields:first name,last name,telephone.How can I delete a contact from this addressbook?How can I pass the parameter recordId to the method deleteRecord of RMS?
This is the List which display all records:
private Screen genNameScr(String title,
String f,
String l,
boolean local) {
SimpleComparator sc;
SimpleFilter sf = null;
RecordEnumeration re;
phoneNums = null;
if (local) {
sc = new SimpleComparator(sortOrder == 0 ?
SimpleComparator.SORT_BY_FIRST_NAME :
SimpleComparator.SORT_BY_LAST_NAME);
if (f != null || l != null) {
sf = new SimpleFilter(f, l);
}
try {
re = addrBook.enumerateRecords(sf, sc, false);
} catch (Exception e) {
displayAlert(ERROR,
"Could not create enumeration: " + e, null);
return null;
}
} else {
re = new NetworkQuery(f,l, sortOrder);
}
nameScr = null;
if (re.hasNextElement()) {
nameScr = new List(title, List.IMPLICIT);
nameScr.addCommand(cmdBack);
nameScr.addCommand(cmdDial);
nameScr.addCommand(cmdModify);
nameScr.addCommand(cmdDelete);
nameScr.setCommandListener(this);
phoneNums = new Vector(6);
try {
while (re.hasNextElement()) {
byte[] b = re.nextRecord();
String pn = SimpleRecord.getPhoneNum(b);
nameScr.append(SimpleRecord.getFirstName(b) +
" " + SimpleRecord.getLastName(b) +
" " + SimpleRecord.getPhoneNum(b), null);
phoneNums.addElement(pn);
}
} catch (Exception e) {
displayAlert(ERROR,
"Error while building name list: " + e, null);
return null;
}
display.setCurrent(nameScr);
} else {
displayAlert(INFO, "Nessun contatto presente in Rubrica", null);
}
return nameScr;
}

Thank you again for your answer.
 
Seriously? That's what you're going with? I prefer this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!