aspose file tools*
The moose likes Java Micro Edition and the fly likes how to add elements to a list by the user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "how to add elements to a list by the user" Watch "how to add elements to a list by the user" New topic
Author

how to add elements to a list by the user

mera zutshi
Greenhorn

Joined: Jan 23, 2009
Posts: 5
my j2me application does following and much more

1.takes words from user in english language.
2.adds them to a list.

can anyone help me as how can i add new words added by user through his mobile to a list in the source code.

thanku

Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

If you are talking about javax.microedition.lcdui.List class , then its not possible using a single screen because the class itself occupies the whole screen. One solution to this could be you break it up in two screens. The first screen i.e a Form contains a TextField, after user enters something and clicks ok another screen opens that extends List class and the entered word is added to the list.


Swastik
mera zutshi
Greenhorn

Joined: Jan 23, 2009
Posts: 5
thank you a lot for that

i will try implementing it and let you know about it.
mera zutshi
Greenhorn

Joined: Jan 23, 2009
Posts: 5
Swastik Dey wrote:If you are talking about javax.microedition.lcdui.List class , then its not possible using a single screen because the class itself occupies the whole screen. One solution to this could be you break it up in two screens. The first screen i.e a Form contains a TextField, after user enters something and clicks ok another screen opens that extends List class and the entered word is added to the list.



but i also need to retrieve the list, made by user inputing the words in the textbox, next time i access the application..

so do i need to store the list in res file of my application?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

Look up RecordStore in the API.


luck, db
There are no new questions, but there may be new answers.
mera zutshi
Greenhorn

Joined: Jan 23, 2009
Posts: 5
Darryl Burke wrote:Look up RecordStore in the API.


thank you very much for replying..

actually i thought about that but for mobile phones wouldn't it be too complex as i have to record sound for each word in my list.

i just want to add elements(words in english language) through a mobile phone (and retrieve them later )and not in the source code ,i am finding it very complex to do.

thank you.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

If you wish to retrieve details later, you do need some permanent storage.
mera zutshi
Greenhorn

Joined: Jan 23, 2009
Posts: 5
Swastik Dey wrote:If you wish to retrieve details later, you do need some permanent storage.



Thank you for replying

Is that possible by using databases only. i am trying to avoid use of database as mobile phone will find it complex.

For mobile phones how will I go for permanent storage then?

Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

You do need a database for permanent storage. So either using RecordStore apis or the other option could be to maintain the database in a server and the phone interacts with server for storing and retrieving records.
 
 
subject: how to add elements to a list by the user