This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes How to update Item text in a Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "How to update Item text in a Form" Watch "How to update Item text in a Form" New topic
Author

How to update Item text in a Form

Erwin Poeze
Greenhorn

Joined: Aug 20, 2008
Posts: 12
Hi,

I created a Form with a single Item and added two commands. The form is displayed using the setCurrent() method.
This all works.

My question is: How can I change the text of the Item in the form without having to create a completely new form?

I tried to use the set method of the Item using item number 0, but this only works once as the item is removed and
a new item with a new number is created. This results in a exception, which is logical.

Then I removed the current Item from the form with deleteAll() and appended a new Item to the form, but nothing happens.
The deleteAll() method does not seem to have any effect.

I think the second approach maybe the best, but I can be completely wrong. Can any comment on my approach?

Thanks,
Erwin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to update Item text in a Form
 
Similar Threads
A question about generics
how to easily sort the same TreeSet few times?
How add/delete rows via JTable?
RAD Workspace and Java Classpath and Server Profiles
Maintaining create/delete/update actions on child records in Hibernate across different sessions