aspose file tools*
The moose likes Java Micro Edition and the fly likes Refresh pb, when using 2 times the same page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Refresh pb, when using 2 times the same page" Watch "Refresh pb, when using 2 times the same page" New topic
Author

Refresh pb, when using 2 times the same page

Kim Prescott
Greenhorn

Joined: Apr 10, 2006
Posts: 15
HI all,
I would like to introduce a pb a met while creating an address book.
Here is the pb:
-> If I m in the contact list and select a contact A to see its informations, a new page opens and shows all contact A info.
- Then I go back to the contact list, I select an other contact B
- So a new contact info page should opened and retrive the contact B
But the page is not re-created, so I still see contact A info

-> The solutions I tried:
- All pages are created that way

So i try to destroy the page once I clik the "back" button and go back to the contact list.
The page is well destroyed, but an error occured every time when I want to call it again.

- I tried also to reinit the elements Name, Mobile .. of the page before to leave it, but when I come back, the last state of the page is saved, and so i don't have the information of the contact B.


I don't have any more idea, that's why i came here to see if you had any suggestion.
Thx
[ April 12, 2006: Message edited by: white rabbit ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

"white rabbit"

Please click on the My Profile link above and change your display name to meet the JavaRanch Naming Policy of using your real first and real last names.

Thanks

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Kim Prescott
Greenhorn

Joined: Apr 10, 2006
Posts: 15
ok Thx,
Is there smbd who has an idea about my pb ?
Theodore Casser
Ranch Hand

Joined: Mar 14, 2001
Posts: 1902

Not seeing all of your code to have a good idea of it... the way I've done it in the past is just figured out where I'm coming into a given form, and ensure that however I'm hitting it, it's re-initializing the fields as necessary with the information. (In many cases, part of my jumping to a new display is to clear out all the fields and put in the information anew.) It sounds vaguely like you're hitting it someway that's keeping the old data.

But, if you give more information, I can try to help in a more meaningful way.


Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
Kim Prescott
Greenhorn

Joined: Apr 10, 2006
Posts: 15
i think i see what you mean, my problem is that, because the page has already been created one time (for the contact A), even if i destroy it when i don't need it, I can't create a new one for the contact B.

tomorrow i will show you the error message I get.

Thanks for your help

edit: i corrected the words. thanks
[ April 13, 2006: Message edited by: Kim Prescott ]
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11499
    
  16

Kim,

Would you please spell out the words in your messages? we have many members for which English is not their primary language. Using abbreviations can make it much harder for them to follow what you are saying.

You may want to read this for more on why we prefer it this way.

thanks


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Kim Prescott
Greenhorn

Joined: Apr 10, 2006
Posts: 15
ok my problem is solved.

in fact, when I destroyed the form, I forgot to destroy also all the object that are on this form.

so the second time when I called the form (contact info), the middlet tried to call the old object that were addressed with the old page and the middlet crashed.

All is fine now.
thanks to people who tried to help me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refresh pb, when using 2 times the same page